Linear algebra practice
Try a new question, then work through the fixed examples below. If you get stuck, check one step and retry.
Use and where specified. Try each question before opening its answer.
1. Read an entry
Section titled “1. Read an entry”Given , find and explain its meaning.
Answer
: record 3 has one practice set. The first index selects a row; the second selects a column.
2. Compare records
Section titled “2. Compare records”Find .
Answer
. The third record has two more study hours and one more set.
3. Decode a weighted sum
Section titled “3. Decode a weighted sum”Evaluate for and .
Answer
. The answer is a scalar, not a two-entry vector.
4. Check a product before calculating
Section titled “4. Check a product before calculating”If has shape , which of and are defined? Give each defined product’s shape.
Answer
is defined and has shape . is undefined because its inner dimensions are 4 and 3.
5. Find an exact solution
Section titled “5. Find an exact solution”Find satisfying , or explain why none exists.
Answer
Row 1 gives . Row 2 gives , so . Row 3 then gives . The solution is .
6. Recognize an impossible target
Section titled “6. Recognize an impossible target”Does lie in the column space of ?
Answer
No. Every vector has its third entry equal to the sum of its first two; . Equivalently, the first two equations require , which predicts 7 in the third row.
7. Distinguish two meanings of independence
Section titled “7. Distinguish two meanings of independence”The columns of are and . Are they linearly independent? Is this a question about probabilistic independence?
Answer
They are linearly dependent because uses coefficients that are not all zero. This is a relationship between fixed vectors, not a claim about independent random events.
8. Check perpendicularity
Section titled “8. Check perpendicularity”For and , compute .
Answer
, so the vectors are perpendicular in Euclidean geometry.
9. Distinguish a coefficient from a projection
Section titled “9. Distinguish a coefficient from a projection”Project onto the span of . Report both the coefficient and the projected vector.
Answer
The coefficient is . The projected vector is . A scalar coefficient and a vector prediction are different answers.
10. Distinguish argmin from minimum
Section titled “10. Distinguish argmin from minimum”For , report the minimum value and one minimizing weight vector.
Answer
The minimum value is . The minimizing vector is . If the objective were MSE, dividing by three would change the minimum to but leave the weights unchanged.
11. Add an intercept
Section titled “11. Add an intercept”We want predictions . Write the new design matrix and its shape, placing the intercept coefficient first.
Answer
The coefficient vector is , and the matrix is , of shape . The first column multiplies the same intercept into every record. Changing the feature set changes the fitting problem.
12. Identify the missing evidence
Section titled “12. Identify the missing evidence”A model has training MSE . What is its MSE on future records?
Answer
The training score does not determine it. We need new-data evidence, such as evaluation on an appropriate held-out set. Least squares solves the stated training objective, not the separate question of future performance.