askesis

Linear algebra flashcards: 50 definitions and theorems

Vectors, matrices, determinants, eigenvalues, orthogonality and the SVD: the linear algebra behind machine learning and engineering, in 50 LaTeX flashcards.

MathIntermediate50 cardsFree

Practice now

Study without an account

0 of 50 seen0 graduated
Dot product

Scheduled with the default Askesis timings. Progress is saved in this browser.

All 50 cards

  1. 1
    Dot product
    u⋅v=∑iuivi\mathbf{u} \cdot \mathbf{v} = \displaystyle\sum_i u_i v_i
  2. 2
    Dot product and the angle between vectors
    u⋅v=∥u∥ ∥v∥cos⁡θ\mathbf{u} \cdot \mathbf{v} = \lVert \mathbf{u} \rVert\,\lVert \mathbf{v} \rVert \cos\theta
  3. 3
    Euclidean norm of a vector
    ∥v∥=v⋅v=∑ivi2\lVert \mathbf{v} \rVert = \sqrt{\mathbf{v} \cdot \mathbf{v}} = \sqrt{\textstyle\sum_i v_i^2}
  4. 4
    When are two vectors orthogonal?
    When their dot product is zero: u⋅v=0\mathbf{u} \cdot \mathbf{v} = 0
  5. 5
    Cross product u×v\mathbf{u} \times \mathbf{v} in R3\mathbb{R}^3
    (u2v3−u3v2,  u3v1−u1v3,  u1v2−u2v1)(u_2 v_3 - u_3 v_2,\; u_3 v_1 - u_1 v_3,\; u_1 v_2 - u_2 v_1)
    It is perpendicular to both vectors, oriented by the right-hand rule.
  6. 6
    Magnitude of the cross product
    ∥u×v∥=∥u∥ ∥v∥sin⁡θ\lVert \mathbf{u} \times \mathbf{v} \rVert = \lVert \mathbf{u} \rVert\,\lVert \mathbf{v} \rVert \sin\theta
    It equals the area of the parallelogram the two vectors span.
  7. 7
    Cauchy–Schwarz inequality
    ∣u⋅v∣≤∥u∥ ∥v∥\lvert \mathbf{u} \cdot \mathbf{v} \rvert \le \lVert \mathbf{u} \rVert\,\lVert \mathbf{v} \rVert
  8. 8
    Triangle inequality
    ∥u+v∥≤∥u∥+∥v∥\lVert \mathbf{u} + \mathbf{v} \rVert \le \lVert \mathbf{u} \rVert + \lVert \mathbf{v} \rVert
  9. 9
    Projection of v\mathbf{v} onto u\mathbf{u}
    proj⁡uv=v⋅uu⋅u u\operatorname{proj}_{\mathbf{u}} \mathbf{v} = \dfrac{\mathbf{v} \cdot \mathbf{u}}{\mathbf{u} \cdot \mathbf{u}}\,\mathbf{u}
  10. 10
    When is the product ABAB defined?
    When AA is m×nm \times n and BB is n×pn \times p; the result is m×pm \times p
  11. 11
    Entry (i,j)(i, j) of ABAB
    (AB)ij=∑kaik bkj(AB)_{ij} = \displaystyle\sum_k a_{ik}\,b_{kj}
  12. 12
    Is matrix multiplication commutative?
    No: in general AB≠BAAB \neq BA
    It is associative and distributive, though.
  13. 13
    Identity matrix
    A square matrix with ones on the diagonal and zeros elsewhere: AI=IA=AAI = IA = A
  14. 14
    Transpose of a product
    (AB)T=BTAT(AB)^T = B^T A^T
  15. 15
    Inverse of a product
    (AB)−1=B−1A−1(AB)^{-1} = B^{-1} A^{-1}
  16. 16
    Inverse of a 2×22 \times 2 matrix
    (abcd)−1=1ad−bc(d−b−ca)\begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}
    It exists only when ad−bc≠0ad - bc \neq 0.
  17. 17
    Trace of a matrix
    The sum of the diagonal entries: tr⁡(A)=∑iaii\operatorname{tr}(A) = \sum_i a_{ii}
    tr⁡(A+B)=tr⁡(A)+tr⁡(B)\operatorname{tr}(A + B) = \operatorname{tr}(A) + \operatorname{tr}(B)
  18. 18
    Cyclic property of the trace
    tr⁡(AB)=tr⁡(BA)\operatorname{tr}(AB) = \operatorname{tr}(BA)
  19. 19
    Determinant of a 2×22 \times 2 matrix (abcd)\begin{pmatrix} a & b \\ c & d \end{pmatrix}
    ad−bcad - bc
  20. 20
    Determinant of (abcdefghi)\begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}
    a(ei−fh)−b(di−fg)+c(dh−eg)a(ei - fh) - b(di - fg) + c(dh - eg)
    Cofactor expansion along the first row.
  21. 21
    det⁡(AB)\det(AB)
    det⁡(A) det⁡(B)\det(A)\,\det(B)
  22. 22
    det⁡(AT)\det(A^T)
    det⁡(A)\det(A)
  23. 23
    det⁡(cA)\det(cA) for an n×nn \times n matrix
    cndet⁡(A)c^n \det(A)
  24. 24
    Effect of swapping two rows on the determinant
    The sign flips
    Adding a multiple of one row to another leaves it unchanged; scaling a row by c scales it by c.
  25. 25
    When is a square matrix invertible?
    Exactly when det⁡(A)≠0\det(A) \neq 0
    Equivalently: full rank, only the trivial solution to Ax = 0, and 0 is not an eigenvalue.
  26. 26
    Span of a set of vectors
    The set of all their linear combinations
  27. 27
    Linear independence
    c1v1+⋯+ckvk=0c_1 \mathbf{v}_1 + \dots + c_k \mathbf{v}_k = \mathbf{0} only when every ci=0c_i = 0
  28. 28
    Basis
    A linearly independent set of vectors that spans the space
  29. 29
    Dimension of a vector space
    The number of vectors in any basis
  30. 30
    Null space of A
    All vectors x\mathbf{x} with Ax=0A\mathbf{x} = \mathbf{0}
  31. 31
    Column space of A
    The span of the columns of AA: all b\mathbf{b} for which Ax=bA\mathbf{x} = \mathbf{b} has a solution
  32. 32
    Rank of a matrix
    The dimension of its column space, which equals the dimension of its row space and the number of pivots
  33. 33
    Rank–nullity theorem (AA is m×nm \times n)
    rank⁡(A)+nullity⁡(A)=n\operatorname{rank}(A) + \operatorname{nullity}(A) = n
    n is the number of columns.
  34. 34
    Elementary row operations
    Swap two rows, multiply a row by a nonzero scalar, add a multiple of one row to another
  35. 35
    Gaussian elimination
    Row-reduce the augmented matrix to row echelon form, then solve by back-substitution
  36. 36
    How many solutions can Ax=bA\mathbf{x} = \mathbf{b} have?
    None, exactly one, or infinitely many
    None if inconsistent; one if consistent with no free variables; infinitely many if there are free variables.
  37. 37
    Least-squares normal equations
    ATA x^=ATbA^T A\,\hat{\mathbf{x}} = A^T \mathbf{b}
  38. 38
    Projection matrix onto the column space of AA (full column rank)
    P=A(ATA)−1ATP = A (A^T A)^{-1} A^T
  39. 39
    Eigenvalue and eigenvector
    Av=λvA\mathbf{v} = \lambda \mathbf{v} with v≠0\mathbf{v} \neq \mathbf{0}
  40. 40
    Characteristic equation
    det⁡(A−λI)=0\det(A - \lambda I) = 0
    Its roots are the eigenvalues.
  41. 41
    Sum and product of the eigenvalues
    Sum =tr⁡(A)= \operatorname{tr}(A), product =det⁡(A)= \det(A)
    Counted with multiplicity, over the complex numbers.
  42. 42
    Diagonalization
    A=PDP−1A = PDP^{-1}, with eigenvectors as the columns of PP and eigenvalues on the diagonal of DD
    Possible exactly when AA has nn linearly independent eigenvectors.
  43. 43
    An n×nn \times n matrix with nn distinct eigenvalues is…
    Diagonalizable
  44. 44
    Matrix powers via diagonalization
    Ak=PDkP−1A^k = P D^k P^{-1}
  45. 45
    Orthogonal matrix
    QTQ=IQ^T Q = I, so Q−1=QTQ^{-1} = Q^T
    Its columns are orthonormal; it preserves lengths and angles, and det Q = ±1.
  46. 46
    Gram–Schmidt process
    Turns a basis into an orthonormal basis: subtract from each vector its projections onto the previous ones, then normalize
  47. 47
    Spectral theorem (real symmetric matrices)
    A real symmetric matrix has real eigenvalues and orthogonal eigenvectors: A=QΛQTA = Q \Lambda Q^T
  48. 48
    Positive definite matrix
    A symmetric matrix with xTAx>0\mathbf{x}^T A \mathbf{x} > 0 for every x≠0\mathbf{x} \neq \mathbf{0}
    Equivalently, all its eigenvalues are positive.
  49. 49
    Singular value decomposition (SVD)
    A=UΣVTA = U \Sigma V^T, with UU and VV orthogonal and Σ\Sigma diagonal with nonnegative entries
    Every real matrix has one.
  50. 50
    Singular values of AA
    The square roots of the eigenvalues of ATAA^T A

Frequently asked questions

What course does this deck match?

A first university course in linear algebra, plus the orthogonality and SVD results used in data science.

Is it useful for machine learning?

Yes. Projections, least squares, eigenvalues, positive definite matrices and the SVD show up throughout ML.

Do I need calculus first?

No. Linear algebra stands on its own; basic algebra is enough to start.