Reference notes.
Linear algebra is the study of vectors, vector spaces, and linear transformations. It is fundamental to modern mathematics, physics, computer science, and machine learning. The subject provides the mathematical framework for understanding systems of linear equations, geometric transformations, and data analysis techniques.
Vectors
Vector Operations
Addition and Scalar Multiplication
Vectors can be added component-wise and multiplied by scalars:
Dot Product (Inner Product)
In , the dot product of two vectors measures their alignment:
(Over , the standard inner product conjugates one argument: .)
Cross Product (in )
The cross product produces a vector perpendicular to both inputs:
Geometric Interpretation
- Vectors represent direction and magnitude
- Addition follows the parallelogram rule
- Dot product relates to projection
- The magnitude gives the area of the parallelogram spanned by and
Vector Spaces
Definition and Axioms
A vector space over a field is a set with two operations (addition and scalar multiplication) satisfying:
- Closure under addition and scalar multiplication
- Associativity and commutativity of addition
- Existence of zero vector and additive inverses
- Distributive and associative properties of scalar multiplication
- Multiplicative identity:
Subspaces
A subset is a subspace if it is closed under addition and scalar multiplication, and contains the zero vector.
Span and Linear Combinations
The span of a set of vectors is the set of all linear combinations:
Linear Independence
Vectors are linearly independent if the only solution to is .
Basis and Dimension
A basis is a linearly independent spanning set. The dimension of a vector space is the number of vectors in any basis.
Matrices
Matrix Operations
Addition and Scalar Multiplication
Matrices of the same dimensions can be added entry-wise. Scalar multiplication multiplies each entry.
Matrix Multiplication
For matrices (m×n) and (n×p), the product is m×p with:
Transpose
The transpose swaps rows and columns:
Trace
The trace of a square matrix is the sum of its diagonal entries:
Special Matrices
For square () matrices:
| Type | Definition |
|---|---|
| Identity | if , else |
| Diagonal | for all |
| Upper triangular | for all (zeros below main diagonal) |
| Lower triangular | for all (zeros above main diagonal) |
| Symmetric | |
| Skew-symmetric | |
| Orthogonal (real) | (complex analogue: unitary, ) |
Matrix Properties
Rank
The rank of a matrix is the dimension of its column space (or equivalently, row space).
Inverse
A square matrix is invertible if there exists such that . A matrix is invertible if and only if its determinant is non-zero.
Determinants
The determinant is a scalar value encoding properties of a square matrix:
- For :
- (for square matrices of the same size)
- (for invertible )
Systems of Linear Equations
Solving Systems
Gaussian Elimination
A systematic method for solving linear systems by applying row operations:
- Swap two rows
- Multiply a row by a non-zero scalar
- Add a multiple of one row to another
Row Echelon Form (REF)
A matrix is in REF if:
- All zero rows are at the bottom
- The leading entry of each non-zero row is to the right of the leading entry above it
Reduced Row Echelon Form (RREF)
RREF additionally requires:
- Leading entries are all 1
- Leading entries are the only non-zero entry in their column
LU Decomposition
Express a matrix as , where is a permutation matrix (for row pivoting), is lower triangular, and is upper triangular ( holds directly only when no row swaps are needed). Useful for solving multiple systems with the same coefficient matrix.
Solution Types
For a system :
- Unique solution: (number of unknowns)
- Infinitely many solutions (over an infinite field such as or ):
- No solution:
Geometric Interpretation
- In , each equation represents a line; solutions are intersections
- In , each equation represents a plane; solutions are intersections
Linear Transformations
Definitions
A function between vector spaces is a linear transformation if:
Kernel (Null Space)
Image (Range)
Rank-Nullity Theorem
For a linear transformation on a finite-dimensional vector space :
Matrix Representation
Every linear transformation between finite-dimensional vector spaces can be represented by a matrix. The matrix depends on the choice of bases for the domain and codomain.
Change of Basis
For a linear operator with matrix in basis and in basis , let be the matrix whose columns are the -basis vectors expressed in basis (so ). Then:
(Conversely, if maps -coordinates to -coordinates via , then .)
Eigenvalues and Eigenvectors
Definitions
For a square matrix , a non-zero vector is an eigenvector if it satisfies:
where the scalar is the corresponding eigenvalue.
Characteristic Polynomial
Eigenvalues are roots of the characteristic polynomial:
Finding Eigenvalues and Eigenvectors
- Solve for eigenvalues
- For each eigenvalue, solve for non-zero eigenvectors
Diagonalisation
A square matrix is diagonalisable if where is diagonal and contains linearly independent eigenvectors as columns.
When is a Matrix Diagonalisable?
- An matrix is diagonalisable if and only if it has linearly independent eigenvectors
- An matrix with distinct eigenvalues in the base field is always diagonalisable over
Spectral Theorem
Every real symmetric matrix is orthogonally diagonalisable: where is orthogonal.
Applications
- Principal Component Analysis (PCA): Dimensionality reduction using eigenvectors of covariance matrices
- Differential Equations: Solving systems via diagonalisation
- Markov Chains: Steady-state distributions from eigenvectors
- Google PageRank: Web page importance via eigenvector of link matrix
Inner Product Spaces
Inner Products
An inner product on a vector space satisfies:
- Linearity in the first argument
- Conjugate symmetry:
- Positive definiteness: , with equality iff
Norms and Distances
The norm induced by an inner product:
Distance:
Orthogonality
Vectors and are orthogonal if .
Gram-Schmidt Orthogonalisation
An algorithm to convert a linearly independent list into an orthonormal basis :
QR Decomposition
For a real matrix with full column rank (), express where () has orthonormal columns (orthogonal when ) and () is upper triangular; obtained via Gram-Schmidt on the columns of .
Singular Value Decomposition (SVD)
Every real matrix can be decomposed as:
where:
- () is orthogonal (left singular vectors)
- () is rectangular diagonal with non-negative real entries (singular values) on its main diagonal
- () is orthogonal (right singular vectors)
(Over , where and are unitary and is the conjugate transpose.)
Applications
- Data compression: Low-rank approximations
- Recommender systems: Matrix factorisation for collaborative filtering
- Image processing: Noise reduction and compression
- Pseudoinverse: Computing for least squares problems
Glossary
| Term | Definition |
|---|---|
| Span | Set of all linear combinations of a set of vectors |
| Basis | Linearly independent spanning set |
| Rank | Dimension of the column space |
| Nullity | Dimension of the null space |
| Kernel | Solution set of |
| Eigenvalue | Scalar such that for some |
| Eigenvector | Non-zero vector where |
| Orthogonal | Perpendicular; inner product equals zero |
| Singular value | Non-negative square root of an eigenvalue of (or over ) |
Tools
- Matrix Calculator — Online tool for matrix operations
- NumPy — Python library for numerical computing
- MATLAB — Commercial numerical computing environment
- Interactive Linear Algebra — Georgia Tech’s interactive textbook
- Symbolab — Step-by-step matrix solver
Learning Resources
Books
- Introduction to Linear Algebra by Gilbert Strang — Classic textbook with geometric intuition
- Linear Algebra Done Right by Sheldon Axler — Proof-focused, avoids determinants early
- Linear Algebra and Its Applications by David Lay — Applications-oriented approach
- Matrix Analysis by Horn and Johnson — Advanced reference
Courses
- MIT 18.06 Linear Algebra — Gilbert Strang’s famous course
- 3Blue1Brown: Essence of Linear Algebra — Visual, intuitive explanations
- Khan Academy: Linear Algebra — Comprehensive free course
See Also
- Calculus — Multivariable calculus uses linear algebra extensively
- Abstract Algebra — Generalises vector space concepts to modules and rings
- Machine Learning — Linear algebra is the computational backbone of ML algorithms
- LLMs — Transformer architectures rely on matrix operations, attention mechanisms, and embeddings
- Embeddings — Vector representations underlying modern AI