Step 5 of 6 in Mathematics
Linear Algebra
Vectors, matrices, and linear transformations. Citation needed
The whole, before the parts
Linear algebra is the study of straight-line structure in any number of dimensions, and almost all of it follows from one decision: allow only two operations, adding vectors and scaling them. A matrix is not a grid of numbers but a function that respects those two operations; matrix multiplication is the composition of two such functions; solving Ax = b is asking whether b is reachable by the function A. Hold that reading and the subject stops being bookkeeping. It is also the one topic here whose payoff is immediate everywhere else: quantum mechanics, statistics, graphics, and machine learning are all this material in different notation. Citation needed
Terminology and core concepts
-
Vectors and vector spaces
A vector space is any set where adding and scaling behave as expected, so the theory applies at once to arrows, polynomials, and functions. Citation needed
- What two operations define a vector space?
- vector addition and scalar multiplication Citation needed
- What is a linear combination?
- a sum of scaled vectors Citation needed
- What is the span of a set of vectors?
- the set of all their linear combinations Citation needed
- What is a subspace?
- a subset closed under addition and scaling Citation needed
- Must every subspace contain the zero vector?
- yes Citation needed
-
Independence, basis, dimension
A basis is a minimal spanning set, and dimension is how many vectors that takes — the count is the same whichever basis you pick. Citation needed
- When is a set of vectors linearly dependent?
- when one is a linear combination of the others Citation needed
- What is a basis?
- a linearly independent spanning set Citation needed
- What is the dimension of a space?
- the number of vectors in any basis Citation needed
- How many vectors can be independent in ℝ³?
- at most three Citation needed
- What do coordinates of a vector depend on?
- the chosen basis Citation needed
-
The matrix as a linear map
Every matrix is a function satisfying A(cx + y) = cAx + Ay, and its columns are the images of the basis vectors — which is the one fact that makes matrix multiplication guessable rather than memorised. Citation needed
- What do the columns of A represent?
- where A sends each basis vector Citation needed
- What does matrix multiplication correspond to?
- composition of the two maps Citation needed
- Why is matrix multiplication not commutative?
- composing functions in the other order is a different function Citation needed
- What shape must A and B have for AB to exist?
- columns of A must match rows of B Citation needed
- What does the identity matrix do?
- leaves every vector unchanged Citation needed
-
Rank, column space, null space
Rank is the dimension of the output; everything about solvability of Ax = b is read off rank and the null space. Citation needed
- What is the column space of A?
- the span of its columns — all reachable outputs Citation needed
- What is the null space of A?
- all x with Ax = 0 Citation needed
- What is the rank of A?
- the dimension of its column space Citation needed
- What does the rank-nullity theorem state?
- rank + nullity = number of columns Citation needed
- What does a non-trivial null space mean for solutions of Ax = b?
- if one solution exists, infinitely many do Citation needed
-
Solving Ax = b
Gaussian elimination is the algorithm; the interesting part is what the shape of the result tells you about existence and uniqueness. Citation needed
- What does row reduction preserve?
- the solution set Citation needed
- When is Ax = b solvable?
- when b lies in the column space of A Citation needed
- What is a pivot?
- the leading non-zero entry of a row after reduction Citation needed
- What does a free variable correspond to?
- a column without a pivot — a direction in the null space Citation needed
- What is the general solution's structure?
- one particular solution plus anything in the null space Citation needed
-
Determinant and invertibility
The determinant is the signed volume scaling factor of the map, so it is zero exactly when the map collapses space and cannot be undone. Citation needed
- What does the determinant measure geometrically?
- the factor by which volume is scaled Citation needed
- What does a determinant of zero mean?
- the matrix is singular — not invertible Citation needed
- What does a negative determinant indicate?
- the map reverses orientation Citation needed
- What is det(AB) in terms of the factors?
- det(A)det(B) Citation needed
- What is the determinant of a 2×2 matrix [[a,b],[c,d]]?
- ad - bc Citation needed
-
Eigenvalues and eigenvectors
An eigenvector is a direction the map only stretches, and its eigenvalue is the stretch — which turns repeated application of a matrix into multiplication by a number. Citation needed
- What equation defines an eigenvector?
- Av = λv with v ≠ 0 Citation needed
- How are eigenvalues found?
- from det(A - λI) = 0 Citation needed
- What does diagonalisation express?
- A = PDP⁻¹ — the same map in an eigenbasis Citation needed
- Why does diagonalisation make Aⁿ easy?
- only the diagonal entries get raised to the power Citation needed
- What is special about the eigenvalues of a symmetric real matrix?
- they are real, with orthogonal eigenvectors Citation needed
- What does an eigenvalue of 1 mean for the long-run behaviour of a transition matrix?
- a steady state in that direction Citation needed
-
Orthogonality and projection
Projection finds the closest point in a subspace, which is why least squares — the engine of regression — is a geometry problem. Citation needed
- What does a dot product of zero mean?
- the vectors are orthogonal Citation needed
- What does the dot product compute, geometrically?
- length times length times the cosine of the angle Citation needed
- What does projecting b onto a subspace find?
- the closest point in that subspace to b Citation needed
- What are the normal equations for least squares?
- AᵀAx = Aᵀb Citation needed
- Why is the least-squares residual orthogonal to the column space?
- otherwise part of it could be removed, giving a closer point Citation needed
- What is an orthonormal basis?
- mutually orthogonal unit vectors Citation needed
-
Change of basis, and the SVD in outline
One map has many matrices, one per basis; choosing the right basis is most of applied linear algebra, and the singular value decomposition is the general-purpose answer. Citation needed
- What does a change-of-basis matrix do?
- re-expresses the same vector in different coordinates Citation needed
- What does the SVD factor a matrix into?
- a rotation, a scaling, and another rotation Citation needed
- What do the singular values rank?
- the directions by how much the map stretches them Citation needed
- What is a low-rank approximation used for?
- keeping the dominant structure and discarding the rest Citation needed
Problems that prove it
-
Decide whether (1,2,3), (2,4,6), and (1,0,1) are linearly independent.
Drills: recognising dependence without computing anything heavy.
Derivation steps
- Observe (2,4,6) = 2 × (1,2,3).
- So a non-trivial combination gives zero: 2v₁ - v₂ = 0.
- Dependent — and no row reduction was needed.
- Their span is therefore 2-dimensional, a plane, not all of ℝ³.
Citation needed
-
Find the rank and a basis for the null space of A = [[1, 2, 1], [2, 4, 3]].
Drills: row reduction, pivots, free variables, rank-nullity as a check.
Derivation steps
- Row-reduce: subtract 2×row 1 from row 2 to get [[1,2,1],[0,0,1]].
- Pivots in columns 1 and 3, so rank = 2.
- Column 2 is free; set x₂ = 1.
- Row 2 gives x₃ = 0; row 1 gives x₁ + 2 = 0, so x₁ = -2.
- Null space basis: (-2, 1, 0). Check rank-nullity: 2 + 1 = 3 columns. ✓
Citation needed
-
Solve Ax = b for A = [[1, 1], [1, -1]] and b = (4, 0), then state what the inverse of A does geometrically.
Drills: elimination, then interpreting the map rather than just the numbers.
Derivation steps
- Add the equations: 2x₁ = 4, so x₁ = 2.
- Subtract: 2x₂ = 4, so x₂ = 2.
- det A = (1)(-1) - (1)(1) = -2, so A is invertible and orientation-reversing.
- It scales areas by 2 and reflects; the inverse undoes both.
Citation needed
-
Find the eigenvalues and eigenvectors of A = [[2, 1], [1, 2]].
Drills: the characteristic polynomial, and reading off eigenvectors.
Derivation steps
- det(A - λI) = (2-λ)² - 1 = 0.
- So (2-λ)² = 1, giving λ = 1 or λ = 3.
- For λ = 3: (A - 3I)v = 0 gives -v₁ + v₂ = 0, so v = (1,1).
- For λ = 1: v₁ + v₂ = 0, so v = (1,-1).
- The matrix is symmetric, and indeed the eigenvectors are orthogonal. ✓
Citation needed
-
Project b = (1, 2) onto the line spanned by a = (3, 4), and verify the residual is orthogonal to a.
Drills: projection as "closest point", with the orthogonality check that proves it.
Derivation steps
- a·b = 3 + 8 = 11; a·a = 9 + 16 = 25.
- Projection = (11/25)a = (33/25, 44/25).
- Residual = b - proj = (1 - 33/25, 2 - 44/25) = (-8/25, 6/25).
- Dot with a: 3(-8/25) + 4(6/25) = (-24 + 24)/25 = 0. ✓
Citation needed
-
Fit the least-squares line through (1,1), (2,2), (3,2) using the normal equations.
Drills: regression as projection — the bridge to statistics.
Derivation steps
- Model y = c + mx, so A has columns (1,1,1) and (1,2,3), and b = (1,2,2).
- AᵀA = [[3, 6], [6, 14]]; Aᵀb = (5, 11).
- Solve: 3c + 6m = 5 and 6c + 14m = 11.
- Double the first and subtract: 2m = 1, so m = 0.5; then c = (5 - 3)/3 = 2/3.
- Line: y = 2/3 + x/2. Residuals (-1/6, 1/3, -1/6) sum to zero, as projection requires. ✓
Citation needed
-
Compute the determinant of [[1,2,3],[0,1,4],[5,6,0]] and say what it tells you about the map.
Drills: cofactor expansion, plus the geometric reading.
Derivation steps
- Expand along the first row: 1(1·0 - 4·6) - 2(0·0 - 4·5) + 3(0·6 - 1·5).
- = 1(-24) - 2(-20) + 3(-5).
- = -24 + 40 - 15 = 1.
- Non-zero, so invertible; magnitude 1, so it preserves volume; positive, so it preserves orientation.
Citation needed
-
A population moves between two cities with transition matrix [[0.9, 0.2], [0.1, 0.8]]. Find the long-run distribution.
Drills: the eigenvalue-1 steady state, which is what Markov chains and PageRank run on.
Derivation steps
- A steady state satisfies Av = v, i.e. it is an eigenvector for λ = 1.
- From the first row: 0.9v₁ + 0.2v₂ = v₁, so 0.2v₂ = 0.1v₁, giving v₁ = 2v₂.
- Normalise so the parts sum to 1: v = (2/3, 1/3).
- So two thirds end up in the first city, regardless of the starting split.
Citation needed
Sources
- Gilbert Strang, Introduction to Linear Algebra and the MIT 18.06 lectures — the four-subspaces framing used above.
- Sheldon Axler, Linear Algebra Done Right — the map-first treatment, determinants last.
- Grant Sanderson, Essence of Linear Algebra (3Blue1Brown) — the geometric reading of determinant and eigenvector.
Learning path
Continue through Mathematics in order, using the concepts above to connect this topic to the next.