Linear Algebra

  • |

    Null Space Primer

    The null space of a matrix A is the set of all input vectors that A sends to zero, a subspace whose dimension, the nullity, adds to the rank to give the input dimension. When Ax = b has a solution, it is unique only if the null space holds the zero vector alone; otherwise there are infinitely many.

  • |

    Singular Value Decomposition Primer

    Singular value decomposition writes any real matrix, of any size or rank, as an orthogonal matrix, a diagonal matrix of singular values, and another orthogonal matrix. Singular values are the semi-axis lengths of the ellipse the matrix makes from the unit circle, and keeping the largest k gives the best rank-k approximation behind PCA and the pseudo-inverse.

  • |

    Matrix Operations Primer

    Matrix addition, subtraction, and scalar multiplication work element by element on same-size matrices, while a product needs matching inner dimensions and changes when the order changes. There is no division, only multiplication by an inverse on a chosen side. Element-wise derivatives and integrals yield the normal equations and the multivariate normal constant.

  • |

    Dot Product Primer

    The dot product, the sum of element-wise products, equals the product of two vector lengths and the cosine of their angle. When the weight vector has unit length, it is the signed length of the input projected onto that axis, which is how linear regression predictions and PLS and PCA scores are computed.