Linear Algebra for Data Science final exam review
The topics, worked on a live board with an AI tutor.
Units
Vectors, dot products and norms
- Vectors as arrows and data
- Vector addition and scaling
- Linear combinations and span
- The dot product
- Norms and distance
Practice
Cara studied 2 hours and slept 8. Write her vector in the order (studied, slept).Answer
(2, 8)
Hint: Studied comes first
Keep u = (3, 1) km but change the second leg to (2, 2) km. Find the net displacement.Answer
(5, 3) km
Hint: Add east to east first
Matrices as transformations
- Matrix-vector multiplication
- Linear transformations
- Rotations, reflections and projections
Practice
Compute Ax for A = [[1, 2], [3, 4]] and x = (2, −1) by columns.Answer
(0, 2)
Hint: 2(1, 3) − (2, 4)
Is S(x, y) = (2x, y²) linear? Test it on one vector.Answer
Matrix multiplication
- Multiplication as composition
- Four views of the product
- Transpose and special matrices
Practice
Send e₁ and e₂ through R first and then H, and write the two columns of the trip.Answer
(1, 1) and (−1, 0)
Hint: R sends e₁ to (0, 1), then H sends (0, 1) to (1, 1)
Multiplication as compositionFind the entry in row 1, column 2 of [[2, 1], [0, 3]] times [[1, 4], [2, 0]].Answer
8
Hint: (2, 1) · (4, 0)
Linear systems and elimination
Practice
Solve x + y = 5 and x − y = 1 and say where the lines cross.Answer
Solve x + y = 5, 3x + 2y = 12 by subtracting 3 times row 1 from row 2.Answer
Rank and inverses
What exams ask
Every solver, regression and change of coordinates in data work needs A⁻¹ to exist, and one quick test tells you before you compute anything whether a system has exactly one answer.
- Rank
- The inverse matrix
- When a matrix is invertible
- Numerical conditioning
Practice
Find the rank of [[1, 2, 3], [2, 4, 6], [1, 0, 1]].Answer
2
Hint: Row 2 − 2 · row 1 is zero, and row 3 − row 1 = (0, −2, −2)
Check that [[3, 1], [5, 2]] and [[2, −1], [−5, 3]] are inverses.Answer
3 · 2 + 1 · (−5) = 1, 3 · (−1) + 1 · 3 = 0, 5 · 2 + 2 · (−5) = 0, 5 · (−1) + 2 · 3 = 1, so the product is I
Hint: Multiply row by column
The inverse matrixVector spaces and subspaces
- Vector spaces
- Column space and null space
- The four fundamental subspaces
Practice
Is the set of (x, y) with xy = 0 a subspace of ℝ²? Test (1, 0) and (0, 1).Answer
No; both are in it but (1, 0) + (0, 1) = (1, 1) has xy = 1
Hint: It is the union of the two axes
Vector spacesFor A = [[1, 3], [2, 6]], is b = (2, 5) in C(A)?Answer
No; outputs are multiples of (1, 2) and (2, 5) is not
Hint: Compare the two entries
Column space and null spaceBases and dimension
Practice
Are (1, 1) and (1, −1) independent?Answer
Yes; c₁ + c₂ = 0 and c₁ − c₂ = 0 give c₁ = c₂ = 0
Hint: Add and subtract the two equations
Linear independenceDo (1, 2) and (3, 4) form a basis of ℝ²?Answer
Yes; they are independent, since 1·4 − 2·3 = −2 ≠ 0
Hint: Neither is a multiple of the other
Basis and dimensionOrthogonality and projections
- Orthogonal vectors and subspaces
- Projection onto a line
- Projection onto a subspace
- Gram-Schmidt and QR
Practice
Find a vector orthogonal to (3, −2) and give the dot product that proves it.Answer
(2, 3), since 3·2 + (−2)·3 = 0
Hint: Swap the entries and change one sign
Orthogonal vectors and subspacesProject b = (3, 4) onto a = (1, 1) and give the error.Answer
p = (7/2, 7/2) and e = (−1/2, 1/2)
Hint: a·b = 7, a·a = 2
Least squares
- The normal equations
- Fitting lines and curves
- Least squares in practice
Practice
Write A and b for the points (0, 1), (1, 1), (2, 4) and test whether Ax = b is solvable.Answer
A = [[1, 0], [1, 1], [1, 2]], b = (1, 1, 4); not solvable, since C = 1 and C + D = 1 give D = 0 but then C + 2D = 1 ≠ 4
Hint: Use rows 1 and 2 first
The normal equationsFit y = C + Dx to (0, 2), (1, 3), (2, 7).Answer
Eigenvalues and diagonalization
- Eigenvalues and eigenvectors
- The characteristic polynomial
- Diagonalizing a matrix
- Symmetric matrices and the spectral theorem
- Positive definite matrices
Practice
For A = [[2, 1], [1, 2]], check that (2, 1) is not an eigenvector.Answer
A(2, 1) = (5, 4), not a multiple of (2, 1)
Hint: Compare the ratios 5/2 and 4/1
Eigenvalues and eigenvectorsFind the characteristic polynomial and eigenvalues of [[5, 2], [2, 2]].Answer
λ² − 7λ + 6 = (λ − 1)(λ − 6), so λ = 1 and λ = 6
Hint: Trace 7, determinant 10 − 4 = 6
The characteristic polynomialSingular value decomposition
- The singular value decomposition
- Computing the SVD
- Low-rank approximation
Practice
For D = [[2, 0], [0, −3]], which perpendicular unit vectors go to perpendicular vectors, and what are the singular values?Answer
(1, 0) and (0, 1); σ = 3 and 2
Hint: Lengths are never negative, so −3 gives 3
Find V and Σ for A = [[1, 2], [2, 1]].Answer
AᵀA = [[5, 4], [4, 5]]; σ = 3 and 1; V = (1/√2)[[1, −1], [1, 1]]
Hint: Trace 10, determinant 9
Principal component analysis
- The covariance matrix
- Principal components
- PCA via SVD and explained variance
- Applying PCA
Practice
Center the data (2, 7), (4, 5), (6, 9).Answer
Means 4 and 7; rows (−2, 0), (0, −2), (2, 2)
Hint: Each column of the result sums to zero
Compute the variance along u = (0, 1) and along u = (1, −1)/√2.Answer
5 and 1
Hint: uᵀCu with C = [[5, 4], [4, 5]]
Questions
What does the Linear Algebra for Data Science review cover?
Every unit of the course, 12 in all. Pick one and Helio teaches it on the board, then asks you questions. Vectors, dot products and norms; Matrices as transformations; Matrix multiplication; Linear systems and elimination; Rank and inverses; Vector spaces and subspaces; Bases and dimension; Orthogonality and projections; Least squares; Eigenvalues and diagonalization; Singular value decomposition; Principal component analysis.
Can it help the week before my final?
Yes. Pick a topic, and Helio explains it, checks you and goes over what you miss.
Is it the same as my class?
It follows the usual topics of Linear Algebra for Data Science. For anything else on your syllabus, type the topic and Helio teaches that too.
How much is free?
30 minutes a month for one learner, with no card. Starter is free for 7 days with a card: cancel in time and pay nothing.






