3. Cheatsheet

Vector[𝑥1𝑥2𝑥𝑛]
Scalar Vector Multiplication𝑐𝑥=[𝑥1𝑥2𝑥𝑛]𝑐𝑥=[𝑐𝑥1𝑐𝑥2𝑐𝑥𝑛]
Dot Product𝑥=[𝑥1𝑥2𝑥𝑛]𝑦=[𝑦1𝑦2𝑦𝑛]𝑥𝑦=𝑖=1𝑛𝑥𝑖𝑦𝑖=𝑥1𝑦1+𝑥2𝑦2++𝑥𝑛𝑦𝑛=𝑥𝑇𝑦
Cross Product (3)𝑎=[𝑎1𝑎2𝑎3]𝑏=[𝑏1𝑏2𝑏3]𝑐=𝑎×𝑏𝑐=[𝑎2𝑏3𝑎3𝑏2𝑎3𝑏1𝑎1𝑏3𝑎1𝑏2𝑎2𝑏1]Returns a vector orthogonal to the two vectors
Vector Space
Closure under addition
𝑢,𝑣𝑉𝑢+𝑣𝑉
Closure under scalar multiplication
𝑣𝑉𝑐𝑐𝑣𝑉
Commutativity of addition
𝑢+𝑣=𝑣+𝑢
Associativity of addition
(𝑢+𝑣)+𝑤=𝑢+(𝑣+𝑤)
Additive identity
𝟎𝑉|𝑣+𝟎=𝑣
Additive inverse
𝑣𝑉𝑣𝑉|𝑣+(𝑣)=0
Scalar multiplication (compatibility)
𝑎(𝑏𝑣)=(𝑎𝑏)𝑣
Distributivity over vector addition
𝑎(𝑢+𝑣)=𝑎𝑢+𝑎𝑣
Distributivity over scalar addition
(𝑎+𝑏)𝑣=𝑎𝑣+𝑏𝑣
Multiplicative identity
1𝑣=𝑣
Subspace

Non-emptiness

𝟎𝑉

Closure under addition

If𝑢,𝑣𝑉,then𝑢+𝑣𝑉

Closure under scalar multiplication

If𝑣𝑉,𝑐,then𝑐𝑣𝑉

A subspace is a subset of a vector space that is itself a vector space, satisfying the same axioms as the original. If 𝑉 is a vector space in 𝑛, then the subspace 𝑈 is always contained in 𝑛, meaning 𝑈𝑛
Vector Addition𝑢=(𝑢1,𝑢2,,𝑢𝑛)𝑣=(𝑣1,𝑣2,,𝑣𝑛)𝑢+𝑣=(𝑢1+𝑣1,𝑢2+𝑣2,,𝑢𝑛+𝑣𝑛)
Dot Product𝑢𝑣=𝑖=1𝑛𝑢𝑖𝑣𝑖
Orthogonality𝑢𝑣=𝟎Angle between the two vectors is 90°
Angle between vectorsΘ=arccos(𝑢𝑣𝑢2𝑣2)
𝐿1 Norm (Manhattan)𝑢1=𝑖=1𝑛|𝑢𝑖|
𝐿2 Norm (Euclidean)𝑢2=𝑖=1𝑛𝑢𝑖2
𝐿1 Distance (Manhattan)𝑑(𝑢,𝑣)=𝑖=1𝑛|𝑢𝑖𝑣𝑖|
𝐿2 Distance (Euclidean)𝑑(𝑢,𝑣)=𝑖=1𝑛(𝑢𝑖𝑣𝑖)2
Projectionproj𝑤(𝑣)=𝑣𝑤𝑤𝑤𝑤
Linear Independence

A set of vectors is linearly independent if no vector in the set can be written as a linear combination of the others

A set of vectors {𝑣1,𝑣2,,𝑣𝑛} is linearly independent if the only solution to the the equation

𝑐1𝑣1+𝑐2𝑣2++𝑐𝑛𝑣𝑛=𝟎

is 𝑐1=𝑐2==𝑐𝑛=0

Transformation𝑇:𝑛𝑚𝑇(𝑣)=𝐴𝑣
  • Additivity

𝑇(𝑢+𝑣)=𝑇(𝑢)+𝑇(𝑣)

  • Homogeneity

𝑇(𝑐𝑢)=𝑐𝑇(𝑢)

  • Surjective (onto)

Every element in 𝐵 is the image of at least one element in 𝐴. The transformation covers the entire codomain.

Range(𝑇)=𝐵

  • Injective (one-to-one)

Different inputs in 𝐴 map to different outputs in 𝐵.The transformation is information-preserving — doesn’t collapse distinct vectors together

𝑇(𝑥1)=𝑇(𝑥2)𝑥1=𝑥2

Or equivalently:

ker(𝑇)={𝟎}

Domain𝑇:𝑉𝑊Domain(𝑇)=𝑉Set of all input vectors 𝑉 that the transformation acts on
Codomain𝑇:𝑉𝑊Codomain(𝑇)=𝑊Set of all possible output vectors 𝑊 to which elements of the domain 𝑉 are mapped under the transformation
Transposedet(𝐴)=det(𝐴𝑇)(𝐴𝐵)𝑇=𝐵𝑇𝐴𝑇(𝐴𝑇)1=(𝐴1)𝑇
Image𝑇:𝑉𝑊Im(𝑇)={𝑤𝑊|𝑤=𝑇(𝑣)for some𝑣𝑉}

The image of a transformation 𝑇:𝑉𝑊 is the set of all possible outputs 𝑇(𝑣) for 𝑣𝑉:

  • It is a subspace of the codomain 𝑊

  • If 𝑇 is represented by a matrix 𝐴, the image of 𝑇 is the column space of 𝐴

Preimage𝑇:𝑉𝑊𝑇1(𝑤)={𝑣𝑉|𝑇(𝑣)=𝑤}The preimage of a transformation refers to the set of all elements in the domain that map to a particular element or subset in the codomain
SpanSpan({𝑣1,𝑣2,,𝑣𝑘})={𝑖=1𝑛𝑐𝑖𝑣𝑖|𝑐𝑖}The span of a set of vectors is the collection of all possible linear combinations of those vectors
Composition𝑇1:𝑛𝑚𝑇2:𝑚𝑝𝑇1(𝑣)=𝐴𝑣𝑇2(𝑣)=𝐵𝑣𝑇𝑆(𝑣)=𝑇2(𝑇1(𝑣))𝑇2𝑇1(𝑣)=𝐵(𝐴𝑣)=(𝐵𝐴)𝑣
  • Additivity

(𝑇3𝑇2)𝑇1=𝑇3(𝑇2𝑇1)

  • Homogeneity

𝑇2𝑇1(𝑐𝑢)=𝑐(𝑇2𝑇1)(𝑢)

  • Identity Transformation

𝐼𝑇=𝑇𝑇𝐼=𝑇

Column Space (Range)

Col(𝐴)={𝐴𝑥|𝑥𝑛}

Or equivalently

𝐴=[𝑐1𝑐2𝑐3]Col(𝐴)=span(𝑐1,𝑐2,,𝑐3)
The column space (or range) of a matrix 𝐴 is the set of all linear combinations of its columns
Determinantdet(𝐴)

The determinant of a square matrix A measure of the "scale factor" by which the matrix A transforms a space

  • det(𝐴)0

    • 𝐴 does not collapse the space
    • 𝐴 has full rank
    • 𝐴’s columns are linearly independent
    • 𝐴 is invertable
  • det(𝐴)=0

    • 𝐴 collapses the space into lower dimension
    • 𝐴 does not have full rank
    • 𝐴’s columns are linearly dependent
    • 𝐴 is non-invertable (singular)
Invertibility

det(𝐴)0Invertible

det(𝐴)=0Non-Invertible

𝐴𝐴1=𝐴1𝐴=𝐼𝑛(𝐴𝐵)1=𝐵1𝐴1(𝐴𝑇)1=(𝐴1)𝑇
Basis

Linear Independence

𝑐1𝑣1+𝑐2𝑣2++𝑐𝑘𝑣𝑘=𝟎𝑐1=𝑐2==𝑐𝑘=0

Spanning

𝑣𝑉,𝑐1,,𝑐𝑘𝑠.𝑡.𝑣=𝑐1𝑣1++𝑐𝑘𝑣𝑘
  • A basis of a vector space 𝑉 is a set of linearly independent vectors that span the space
  • Every vector in 𝑉 can be uniquely written as a linear combination of the basis vectors

E.g.:

Dimensiondim(𝑉)

Number of linearly independent vectors (basis) in a vector space 𝑉

𝑉𝑛

dim(𝑉)=0𝑉={𝟎}
dim(𝑉)=1𝑉 is a line through the origin in 𝑛
dim(𝑉)=2𝑉 is a plane through the origin in 𝑛
dim(𝑉)=𝑘𝑉 is a 𝑘-dimensional flat subspace of 𝑛
dim(𝑉)=𝑛𝑉=𝑛
  • 2 has dimension 2:

    • A basis: {[10],[01]}
  • 3 has dimension 3:

    • A basis: {[100],[010],[001]}
RankRank(𝐴)=dim(Col(𝐴))=dim(Row(𝐴))
  • The rank of a matrix 𝐴 is the dimension of its column space (or row space)
  • Number of linearly independent columns (or rows)
Eigen𝐴𝑥=𝜆𝑥,𝑥𝟎

Set of all nonzero vectors 𝑥 such that when the transformation represented by matrix 𝐴 is applied to 𝑥, the result is a scaled version of 𝑥 itself

These vectors lie along directions that are preserved by the transformation:

  • |𝜆|>1: stretched
  • 0<|𝜆|<1: shrunk
  • 𝜆<0: flipped
  • 𝜆=1: stay the same
Null Space (kernel)Null(𝐴)={𝑥𝑛|𝐴𝑥=𝟎}The null space of a matrix 𝐴 is the set of all input vectors that get mapped to the zero vector when you multiply them by 𝐴
Identity Matrix𝐼𝑛=[1000010000100001]
Matrix Inverse𝐴𝐴1=𝐼
RREF
  1. Row Swapping (Interchange)
𝑅1↔︎𝑅2
  1. Row Scaling (Multiplication)
𝑅113𝑅1
  1. Row Addition (Replacement)
𝑅1𝑅12𝑅2

3.1. Matrix

𝑛
𝑚[𝑎11𝑎12𝑎1𝑛𝑎21𝑎22𝑎2𝑛𝑎𝑚1𝑎𝑚2𝑎𝑚𝑛])

3.1.1. Matrix Vector Product

𝑛
𝑚[𝑎11𝑎12𝑎1𝑛𝑎21𝑎22𝑎2𝑛𝑎𝑚1𝑎𝑚2𝑎𝑚𝑛]
𝑛[𝑥1𝑥2𝑥𝑛]
[𝑎11𝑥1+𝑎12𝑥2++𝑎1𝑛𝑥𝑛𝑎21𝑥1+𝑎22𝑥2++𝑎2𝑛𝑥𝑛𝑎𝑚1𝑥1+𝑎𝑚2𝑥2++𝑎𝑚𝑛𝑥𝑛]

3.1.2. Matrix Multiplication

𝑛
𝐴=𝑚[𝑎11𝑎12𝑎1𝑛𝑎21𝑎22𝑎2𝑛𝑎𝑚1𝑎𝑚2𝑎𝑚𝑛]
𝑝
𝐵=𝑛[𝑏11𝑏12𝑏1𝑝𝑏21𝑏22𝑏2𝑝𝑏𝑛1𝑏𝑛2𝑏𝑛𝑝]
𝑛
𝐴=𝑚[[𝑎11𝑎12𝑎1𝑛][𝑎21𝑎22𝑎2𝑛][𝑎𝑚1𝑎𝑚2𝑎𝑚𝑛]]
𝑝
𝐵=𝑛[[𝑏11𝑏21𝑏𝑛1][𝑏12𝑏22𝑏𝑛2][𝑏1𝑝𝑏2𝑝𝑏𝑛𝑝]]
𝐴: Row Representation
𝐴=[𝑟1𝑟2𝑟𝑚]𝑟𝑖=[𝑎𝑖1𝑎𝑖2𝑎𝑖𝑛],for𝑖=1,2,,𝑚
𝐵: Column Representation
𝐵=[𝑐1𝑐2𝑐𝑝]𝑐𝑗=[𝑏1𝑗𝑏2𝑗𝑏𝑛𝑗],for𝑗=1,2,,𝑝
𝑝
𝐶=𝑚[𝑟1𝑐1𝑟1𝑐2𝑟1𝑐𝑝𝑟2𝑐1𝑟2𝑐2𝑟2𝑐𝑝𝑟𝑚𝑐1𝑟𝑚𝑐2𝑟𝑚𝑐𝑝]

3.1.3. Transpose

𝐴𝑇
𝑛
𝐴=𝑚[𝑎11𝑎12𝑎1𝑛𝑎21𝑎22𝑎2𝑛𝑎𝑚1𝑎𝑚2𝑎𝑚𝑛]
𝑚
𝐴𝑇=𝑛[𝑎11𝑎21𝑎𝑚1𝑎12𝑎22𝑎𝑚2𝑎1𝑛𝑎2𝑛𝑎𝑚𝑛]
𝑛
𝐴=𝑚[𝑎11𝑎12𝑎1𝑗𝑎1𝑛𝑎21𝑎22𝑎2𝑗𝑎2𝑛𝑎𝑖1𝑎𝑖2𝑎𝑖𝑗𝑎𝑖𝑛𝑎𝑚1𝑎𝑚2𝑎𝑖𝑗𝑎𝑚𝑛]
𝑚
𝐴𝑇=𝑛[𝑎11𝑎21𝑎𝑖1𝑎𝑚1𝑎12𝑎22𝑎𝑖2𝑎𝑚2𝑎1𝑗𝑎2𝑗𝑎𝑖𝑗𝑎𝑚𝑗𝑎1𝑛𝑎2𝑛𝑎𝑖𝑛𝑎𝑚𝑛]

3.2. Matrix Factorization

3.2.1. LU Decomposition

𝐴=𝐿𝑈

where:

  1. 𝑚×𝑛 Matrix (with 𝑚𝑛)
𝑛
𝐿=𝑚[𝑙11𝑙12𝑙1𝑛𝑙21𝑙22𝑙2𝑛𝑙𝑚1𝑙𝑚2𝑙𝑚𝑛]
𝑛
𝑈=𝑛[𝑢11𝑢12𝑢1𝑛𝑢21𝑢22𝑢2𝑛𝑢𝑛1𝑢𝑛2𝑢𝑛𝑛]
  1. 𝑚×𝑛 Matrix (with 𝑚<𝑛)

see QR Decomposition

3.3. Singular Value Decomposition (SVD)

𝐴=𝑈Σ𝑉𝑇
𝑚
𝑈=𝑚[𝑢11𝑢12𝑢1𝑚𝑢21𝑢22𝑢2𝑚𝑢𝑚1𝑢𝑚2𝑢𝑚𝑚]
𝑛
Σ=𝑚[𝜀11𝜀12𝜀1𝑚𝜀21𝜀22𝜀2𝑚𝜀𝑛1𝜀𝑛2𝜀𝑛𝑚]
𝑛
𝑉𝑇=𝑛[𝑣11𝑣12𝑣1𝑛𝑣21𝑣22𝑣2𝑛𝑣𝑛1𝑣𝑛2𝑣𝑛𝑛]
[121223153424]
𝑅2𝑅22𝑅1𝑅3𝑅33𝑅1[121201310212]
𝑅2𝑅2[121201310212]
𝑅1𝑅12𝑅2𝑅3𝑅3+2𝑅2[105401310054]
𝑅315𝑅3[1054013100145]
𝑅1𝑅15𝑅3𝑅2𝑅2+3𝑅3[10000107500145]
Example
𝐴=[213426]
  1. Null Space

The null-space of 𝐴, denoted 𝑁(𝐴), consists of all vectors 𝑥3 such that 𝐴𝑥=0. The set of all such vectors is the pre-image of the zero vector under the transformation defined by 𝐴. In other words, 𝑁(𝐴)={𝑥3|𝐴𝑥=0}, which represents the set of vectors that 𝐴 maps to zero.

𝑁(𝐴)={𝑥3|𝐴𝑥=𝟎}

To find the null space 𝑁(𝐴) of the matrix 𝐴, we can use the row-reduced echelon form (RREF). By augmenting the matrix 𝐴 with a zero column and performing row operations, we reduce it to the form:

[213426][𝑥1𝑥2𝑥3]=[00]
[21304260]
𝑅1𝑅12𝑅2𝑅24[112320112320]
𝑅2𝑅2𝑅1[1123200000]
[11232000][𝑥1𝑥2𝑥3]=[00]𝑥112𝑥232𝑥2=0𝑥1=12𝑥2+32𝑥2[𝑥1𝑥2𝑥3]=𝑥2[1210]+𝑥3[3201]𝑁(𝑎)=span({[1210][3201]})

The dimension of the null-space is the number of vectors in this basis, which is 2. This is important because the dimension of the null space gives us insight into how many degrees of freedom exist in the system of equations 𝐴𝑥=0

  1. Column Space
𝐶(𝐴)=span({[24][12][36]})=span({[24]})
  1. Basis
[24]
  1. Rank

Number of vector in the basis of our column space

Rank(𝐴)=1