Timer stopped. The real final allows 120 minutes in one sitting.

Time is up. On the real final, the exam closes now. Finish the problem you are on, then check your work.

Linear Algebra

Practice Final with Worked Solutions

How to Use This Resource: Start the timer, close your notes, and work every problem on paper, just as you will on the real final. When the timer ends or you finish, open the worked solution under each problem and check your work one step at a time. Then rehearse uploading your work by taking Optional: Practice Final Exam in Learn, as many times as you like.

Section 1: Quick Problems

Fifteen problems. Each one is a single skill.

Question 1

6 points
How many distinct reduced row echelon shapes are possible for a nonzero 2×32 \times 3 matrix? Sketch each shape using ■\blacksquare for a pivot, ∗* for any entry, and 00, then state the count.
Show worked solution
  1. Step 1: Count the Possible Pivots

    A nonzero 2×32 \times 3 matrix has either one pivot or two pivots, because it has only two rows.
  2. Step 2: List the One-Pivot Shapes

    The single pivot can sit in column 1, 2 or 3. Every entry to its left is 0, the entries to its right are free, and the second row is all zeros.
    [■∗∗000],[0■∗000],[00■000]\begin{bmatrix} \blacksquare & * & * \\ 0 & 0 & 0 \end{bmatrix},\quad \begin{bmatrix} 0 & \blacksquare & * \\ 0 & 0 & 0 \end{bmatrix},\quad \begin{bmatrix} 0 & 0 & \blacksquare \\ 0 & 0 & 0 \end{bmatrix}
    [■∗∗000][0■∗000][00■000]\begin{gathered}\begin{bmatrix} \blacksquare & * & * \\ 0 & 0 & 0 \end{bmatrix} \\[6pt] \begin{bmatrix} 0 & \blacksquare & * \\ 0 & 0 & 0 \end{bmatrix} \\[6pt] \begin{bmatrix} 0 & 0 & \blacksquare \\ 0 & 0 & 0 \end{bmatrix}\end{gathered}
  3. Step 3: List the Two-Pivot Shapes

    Two pivots can sit in columns 1 and 2, 1 and 3, or 2 and 3. In reduced form each pivot is the only nonzero entry in its column, so the entry above the second pivot is 0.
    [■0∗0■∗],[■∗000■],[0■000■]\begin{bmatrix} \blacksquare & 0 & * \\ 0 & \blacksquare & * \end{bmatrix},\quad \begin{bmatrix} \blacksquare & * & 0 \\ 0 & 0 & \blacksquare \end{bmatrix},\quad \begin{bmatrix} 0 & \blacksquare & 0 \\ 0 & 0 & \blacksquare \end{bmatrix}
    [■0∗0■∗][■∗000■][0■000■]\begin{gathered}\begin{bmatrix} \blacksquare & 0 & * \\ 0 & \blacksquare & * \end{bmatrix} \\[6pt] \begin{bmatrix} \blacksquare & * & 0 \\ 0 & 0 & \blacksquare \end{bmatrix} \\[6pt] \begin{bmatrix} 0 & \blacksquare & 0 \\ 0 & 0 & \blacksquare \end{bmatrix}\end{gathered}
  4. Step 4: State the Count

    There are 3+3=63 + 3 = 6 shapes.

Answer

6 shapes, sketched above.

Question 2

6 points
Compute A−1A^{-1} for
A=[4−36−5].A = \begin{bmatrix} 4 & -3 \\ 6 & -5 \end{bmatrix}.
Show worked solution
  1. Step 1: Find the Determinant

    det⁡A=(4)(−5)−(−3)(6)=−20+18=−2.\det A = (4)(-5) - (-3)(6) = -20 + 18 = -2. The determinant is not 0, so AA is invertible.
  2. Step 2: Swap and Negate

    For a 2×22 \times 2 matrix, swap the two diagonal entries and negate the two off-diagonal entries:
    [−53−64].\begin{bmatrix} -5 & 3 \\ -6 & 4 \end{bmatrix}.
  3. Step 3: Divide by the Determinant

    A−1=1−2[−53−64]=[5/2−3/23−2].A^{-1} = \frac{1}{-2}\begin{bmatrix} -5 & 3 \\ -6 & 4 \end{bmatrix} = \begin{bmatrix} 5/2 & -3/2 \\ 3 & -2 \end{bmatrix}.
    A−1=1−2[−53−64]=[5/2−3/23−2].\begin{aligned}A^{-1} &= \frac{1}{-2}\begin{bmatrix} -5 & 3 \\ -6 & 4 \end{bmatrix} \\ &= \begin{bmatrix} 5/2 & -3/2 \\ 3 & -2 \end{bmatrix}.\end{aligned}
  4. Step 4: Check

    Multiply: AA−1AA^{-1} has first row (4⋅52−3⋅3, 4⋅(−32)+(−3)(−2))=(1,0)(4 \cdot \tfrac52 - 3 \cdot 3,\ 4 \cdot (-\tfrac32) + (-3)(-2)) = (1, 0) and second row (6⋅52−5⋅3, 6⋅(−32)+(−5)(−2))=(0,1).(6 \cdot \tfrac52 - 5 \cdot 3,\ 6 \cdot (-\tfrac32) + (-5)(-2)) = (0, 1). Row reducing [A∣I][A \mid I] gives the same answer.

Answer

A−1=[5/2−3/23−2]A^{-1} = \begin{bmatrix} 5/2 & -3/2 \\ 3 & -2 \end{bmatrix}

Question 3

6 points
Compute the product ABAB both ways: (a) by the column definition, where Ab1A\mathbf{b}_1 and Ab2A\mathbf{b}_2 are computed separately, and (b) by the row-column rule, where
A=[2−150−34],B=[3−214].A = \begin{bmatrix} 2 & -1 \\ 5 & 0 \\ -3 & 4 \end{bmatrix},\qquad B = \begin{bmatrix} 3 & -2 \\ 1 & 4 \end{bmatrix}.
A=[2−150−34]B=[3−214].\begin{gathered}\begin{aligned}A &= \begin{bmatrix} 2 & -1 \\ 5 & 0 \\ -3 & 4 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} B &= \begin{bmatrix} 3 & -2 \\ 1 & 4 \end{bmatrix}.\end{aligned}\end{gathered}
Show both methods.
Show worked solution
  1. Step 1: Name the Columns

    The columns of AA are a1=(2,5,−3)T\mathbf{a}_1 = (2, 5, -3)^T and a2=(−1,0,4)T\mathbf{a}_2 = (-1, 0, 4)^T. The columns of BB are b1=(3,1)T\mathbf{b}_1 = (3, 1)^T and b2=(−2,4)T\mathbf{b}_2 = (-2, 4)^T.
  2. Step 2: Method (a): Column 1

    Ab1=3a1+1a2=(6−1, 15+0, −9+4)T=(5,15,−5)T.A\mathbf{b}_1 = 3\mathbf{a}_1 + 1\mathbf{a}_2 = (6 - 1,\ 15 + 0,\ -9 + 4)^T = (5, 15, -5)^T.
  3. Step 3: Method (a): Column 2

    Ab2=−2a1+4a2=(−4−4, −10+0, 6+16)T=(−8,−10,22)T.A\mathbf{b}_2 = -2\mathbf{a}_1 + 4\mathbf{a}_2 = (-4 - 4,\ -10 + 0,\ 6 + 16)^T = (-8, -10, 22)^T.
  4. Step 4: Method (b): Row Times Column

    Entry (i,j)(i, j) is row ii of AA dotted with column jj of BB: (1,1)=6−1=5(1,1) = 6 - 1 = 5, (1,2)=−4−4=−8(1,2) = -4 - 4 = -8, (2,1)=15(2,1) = 15, (2,2)=−10(2,2) = -10, (3,1)=−9+4=−5(3,1) = -9 + 4 = -5, (3,2)=6+16=22(3,2) = 6 + 16 = 22.
  5. Step 5: Assemble

    Both methods give
    AB=[5−815−10−522].AB = \begin{bmatrix} 5 & -8 \\ 15 & -10 \\ -5 & 22 \end{bmatrix}.
    AB=[5−815−10−522].\begin{aligned}AB &= \begin{bmatrix} 5 & -8 \\ 15 & -10 \\ -5 & 22 \end{bmatrix}.\end{aligned}
    The product is 3×23 \times 2 because AA is 3×23 \times 2 and BB is 2×22 \times 2.

Answer

AB=[5−815−10−522]AB = \begin{bmatrix} 5 & -8 \\ 15 & -10 \\ -5 & 22 \end{bmatrix} by both methods.

Question 4

6 points
Is b\mathbf{b} in the column space of AA for
A=[13−2261−1−34],b=[052]?A = \begin{bmatrix} 1 & 3 & -2 \\ 2 & 6 & 1 \\ -1 & -3 & 4 \end{bmatrix},\qquad \mathbf{b} = \begin{bmatrix} 0 \\ 5 \\ 2 \end{bmatrix}?
A=[13−2261−1−34]b=[052]?\begin{gathered}\begin{aligned}A &= \begin{bmatrix} 1 & 3 & -2 \\ 2 & 6 & 1 \\ -1 & -3 & 4 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} \mathbf{b} &= \begin{bmatrix} 0 \\ 5 \\ 2 \end{bmatrix}?\end{aligned}\end{gathered}
Justify via row reduction of [A∣b][A \mid \mathbf{b}].
Show worked solution
  1. Step 1: Set Up the Question

    b\mathbf{b} is in Col⁡A\operatorname{Col} A exactly when Ax=bA\mathbf{x} = \mathbf{b} has a solution, so row reduce the augmented matrix.
  2. Step 2: Clear Column 1

    R2→R2−2R1R_2 \to R_2 - 2R_1 gives (0,0,5∣5)(0, 0, 5 \mid 5). R3→R3+R1R_3 \to R_3 + R_1 gives (0,0,2∣2)(0, 0, 2 \mid 2).
  3. Step 3: Clear Below the Second Pivot

    R3→R3−25R2R_3 \to R_3 - \tfrac{2}{5}R_2 gives (0,0,0∣0)(0, 0, 0 \mid 0):
    [13−2000550000]\left[\begin{array}{ccc|c} 1 & 3 & -2 & 0 \\ 0 & 0 & 5 & 5 \\ 0 & 0 & 0 & 0 \end{array}\right]
  4. Step 4: Read the Result

    No row has the form [0 0 0∣c][0\ 0\ 0 \mid c] with c≠0c \neq 0, so the system is consistent. Both AA and [A∣b][A \mid \mathbf{b}] have rank 2. One solution is x3=1x_3 = 1, x2=0x_2 = 0, x1=2x_1 = 2: indeed 2a1+a3=(0,5,2)T.2\mathbf{a}_1 + \mathbf{a}_3 = (0, 5, 2)^T.

Answer

Yes. The system is consistent, so b\mathbf{b} is in Col⁡A\operatorname{Col} A (for example, b=2a1+a3\mathbf{b} = 2\mathbf{a}_1 + \mathbf{a}_3).

Question 5

6 points
Decide whether the set {(1,2,−1), (0,1,3), (2,5,2), (1,1,−3)}\{(1, 2, -1),\allowbreak\,(0, 1, 3),\allowbreak\,(2, 5, 2),\allowbreak\,(1, 1, -3)\} is a basis for R3\mathbb{R}^3. Row reduce as needed and classify the set: a basis, independent but not spanning, spanning but not independent, or neither.
Show worked solution
  1. Step 1: Build the Matrix

    Put the vectors in the columns of a 3×43 \times 4 matrix:
    [10212151−132−3]\begin{bmatrix} 1 & 0 & 2 & 1 \\ 2 & 1 & 5 & 1 \\ -1 & 3 & 2 & -3 \end{bmatrix}
  2. Step 2: Row Reduce

    R2→R2−2R1R_2 \to R_2 - 2R_1 and R3→R3+R1R_3 \to R_3 + R_1 give rows (0,1,1,−1)(0, 1, 1, -1) and (0,3,4,−2)(0, 3, 4, -2). Then R3→R3−3R2R_3 \to R_3 - 3R_2 gives (0,0,1,1)(0, 0, 1, 1):
    [1021011−10011]\begin{bmatrix} 1 & 0 & 2 & 1 \\ 0 & 1 & 1 & -1 \\ 0 & 0 & 1 & 1 \end{bmatrix}
  3. Step 3: Test Spanning

    There is a pivot in every row, so the columns span R3\mathbb{R}^3.
  4. Step 4: Test Independence

    Column 4 has no pivot, so the set is linearly dependent. You can also see this without any work: four vectors in R3\mathbb{R}^3 are always dependent.

Answer

Spanning but not independent, so not a basis.

Question 6

6 points
Find a basis for the null space of
A=[1020−3−31−701322214].A = \begin{bmatrix} 1 & 0 & 2 & 0 & -3 \\ -3 & 1 & -7 & 0 & 13 \\ 2 & 2 & 2 & 1 & 4 \end{bmatrix}.
A=[1020−3−31−701322214].\begin{aligned}A &= \begin{bmatrix} 1 & 0 & 2 & 0 & -3 \\ -3 & 1 & -7 & 0 & 13 \\ 2 & 2 & 2 & 1 & 4 \end{bmatrix}.\end{aligned}
Write the basis and state dim⁡Nul⁡A\dim \operatorname{Nul} A.
Show worked solution
  1. Step 1: Clear Column 1

    R2→R2+3R1R_2 \to R_2 + 3R_1 gives (0,1,−1,0,4)(0, 1, -1, 0, 4). R3→R3−2R1R_3 \to R_3 - 2R_1 gives (0,2,−2,1,10)(0, 2, -2, 1, 10).
  2. Step 2: Clear Column 2

    R3→R3−2R2R_3 \to R_3 - 2R_2 gives (0,0,0,1,2)(0, 0, 0, 1, 2). The matrix is now in reduced echelon form:
    [1020−301−10400012]\begin{bmatrix} 1 & 0 & 2 & 0 & -3 \\ 0 & 1 & -1 & 0 & 4 \\ 0 & 0 & 0 & 1 & 2 \end{bmatrix}
  3. Step 3: Solve for the Pivot Variables

    The pivots are in columns 1, 2 and 4, so x3x_3 and x5x_5 are free. The rows say x1=−2x3+3x5x_1 = -2x_3 + 3x_5, x2=x3−4x5x_2 = x_3 - 4x_5 and x4=−2x5x_4 = -2x_5.
  4. Step 4: Write the Parametric Form

    x=x3[−21100]+x5[3−40−21]\mathbf{x} = x_3\begin{bmatrix} -2 \\ 1 \\ 1 \\ 0 \\ 0 \end{bmatrix} + x_5\begin{bmatrix} 3 \\ -4 \\ 0 \\ -2 \\ 1 \end{bmatrix}
    x=x3[−21100]+x5[3−40−21]\begin{aligned}\mathbf{x} &= x_3\begin{bmatrix} -2 \\ 1 \\ 1 \\ 0 \\ 0 \end{bmatrix} \\ &\qquad + x_5\begin{bmatrix} 3 \\ -4 \\ 0 \\ -2 \\ 1 \end{bmatrix}\end{aligned}
    The two vectors are independent (each has a 1 where the other has a 0), so they form a basis.

Answer

Basis {(−2,1,1,0,0)T, (3,−4,0,−2,1)T};\{(-2, 1, 1, 0, 0)^T,\ (3, -4, 0, -2, 1)^T\}; dim⁡Nul⁡A=2\dim \operatorname{Nul} A = 2.

Question 7

6 points
For the subspace
H={[a−2b3ba+b2a]:a,b∈R},H = \left\{ \begin{bmatrix} a - 2b \\ 3b \\ a + b \\ 2a \end{bmatrix} : a, b \in \mathbb{R} \right\},
H={[a−2b3ba+b2a]:a,b∈R},\begin{aligned}H &= \left\{ \begin{bmatrix} a - 2b \\ 3b \\ a + b \\ 2a \end{bmatrix} : a, b \in \mathbb{R} \right\},\end{aligned}
find a basis. State dim⁡H\dim H.
Show worked solution
  1. Step 1: Separate the Parameters

    [a−2b3ba+b2a]=a[1012]+b[−2310]\begin{bmatrix} a - 2b \\ 3b \\ a + b \\ 2a \end{bmatrix} = a\begin{bmatrix} 1 \\ 0 \\ 1 \\ 2 \end{bmatrix} + b\begin{bmatrix} -2 \\ 3 \\ 1 \\ 0 \end{bmatrix}
    [a−2b3ba+b2a]=a[1012]+b[−2310]\begin{aligned}& \begin{bmatrix} a - 2b \\ 3b \\ a + b \\ 2a \end{bmatrix} \\ &= a\begin{bmatrix} 1 \\ 0 \\ 1 \\ 2 \end{bmatrix} \\ &\qquad + b\begin{bmatrix} -2 \\ 3 \\ 1 \\ 0 \end{bmatrix}\end{aligned}
    So HH is the span of these two vectors.
  2. Step 2: Check Independence

    Neither vector is a multiple of the other: the second entries are 0 and 3, while the fourth entries are 2 and 0. Two vectors that are not multiples of each other are independent.

Answer

Basis {(1,0,1,2)T, (−2,3,1,0)T}\{(1, 0, 1, 2)^T,\ (-2, 3, 1, 0)^T\}; dim⁡H=2\dim H = 2.

Question 8

6 points
The transformation T:R2→R2T:\mathbb{R}^2 \to \mathbb{R}^2 rotates points about the origin through 2π/32\pi/3 radians (counterclockwise). Find its standard matrix.
Show worked solution
  1. Step 1: Recall the Columns

    The standard matrix has columns T(e1)T(\mathbf{e}_1) and T(e2)T(\mathbf{e}_2). A rotation through θ\theta sends e1\mathbf{e}_1 to (cos⁡θ,sin⁡θ)T(\cos\theta, \sin\theta)^T and e2\mathbf{e}_2 to (−sin⁡θ,cos⁡θ)T(-\sin\theta, \cos\theta)^T.
  2. Step 2: Evaluate the Trig Values

    At θ=2π/3\theta = 2\pi/3, the angle is in the second quadrant, so cos⁡θ=−12\cos\theta = -\tfrac12 and sin⁡θ=32\sin\theta = \tfrac{\sqrt3}{2}.
  3. Step 3: Build the Matrix

    T(e1)=(−12,32)TT(\mathbf{e}_1) = \left(-\tfrac12, \tfrac{\sqrt3}{2}\right)^T and T(e2)=(−32,−12)T.T(\mathbf{e}_2) = \left(-\tfrac{\sqrt3}{2}, -\tfrac12\right)^T.

Answer

[−1/2−3/23/2−1/2]\begin{bmatrix} -1/2 & -\sqrt{3}/2 \\ \sqrt{3}/2 & -1/2 \end{bmatrix}

Question 9

6 points
How many columns does CC have if BCBC is a 5×25 \times 2 matrix?
Show worked solution
  1. Step 1: Use the Size Rule

    If BB is m×pm \times p and CC is p×np \times n, then BCBC is m×nm \times n. The product takes its rows from BB and its columns from CC.
  2. Step 2: Read Off the Answer

    BCBC is 5×25 \times 2, so n=2n = 2. The number of rows of CC (which equals the number of columns of BB) is not determined by this information.

Answer

2 columns.

Question 10

6 points
Compute
D=∣13−242510000−23412∣.D = \begin{vmatrix} 1 & 3 & -2 & 4 \\ 2 & 5 & 1 & 0 \\ 0 & 0 & 0 & -2 \\ 3 & 4 & 1 & 2 \end{vmatrix}.
D=∣13−242510000−23412∣.\begin{aligned}D &= \begin{vmatrix} 1 & 3 & -2 & 4 \\ 2 & 5 & 1 & 0 \\ 0 & 0 & 0 & -2 \\ 3 & 4 & 1 & 2 \end{vmatrix}.\end{aligned}
Show worked solution
  1. Step 1: Choose the Easiest Row

    Row 3 has a single nonzero entry, a34=−2a_{34} = -2, so expand along row 3. The cofactor sign is (−1)3+4=−1(-1)^{3+4} = -1.
  2. Step 2: Set Up the Expansion

    D=(−1)3+4(−2) M34=2∣13−2251341∣D = (-1)^{3+4}(-2)\,M_{34} = 2\begin{vmatrix} 1 & 3 & -2 \\ 2 & 5 & 1 \\ 3 & 4 & 1 \end{vmatrix}
    D=(−1)3+4(−2) M34=2∣13−2251341∣\begin{aligned}D &= (-1)^{3+4}(-2)\,M_{34} \\ &= 2\begin{vmatrix} 1 & 3 & -2 \\ 2 & 5 & 1 \\ 3 & 4 & 1 \end{vmatrix}\end{aligned}
    where M34M_{34} is the determinant left after deleting row 3 and column 4.
  3. Step 3: Evaluate the Minor

    Expand along row 1: 1(5⋅1−1⋅4)−3(2⋅1−1⋅3)+(−2)(2⋅4−5⋅3)=1+3+14=18.1(5 \cdot 1 - 1 \cdot 4) - 3(2 \cdot 1 - 1 \cdot 3) + (-2)(2 \cdot 4 - 5 \cdot 3) = 1 + 3 + 14 = 18.
  4. Step 4: Finish

    D=2⋅18=36D = 2 \cdot 18 = 36.

Answer

D=36D = 36

Question 11

6 points
Verify the identity
∣21−18−412305∣=4∣21−12−13305∣.\begin{vmatrix} 2 & 1 & -1 \\ 8 & -4 & 12 \\ 3 & 0 & 5 \end{vmatrix} = 4\begin{vmatrix} 2 & 1 & -1 \\ 2 & -1 & 3 \\ 3 & 0 & 5 \end{vmatrix}.
∣21−18−412305∣=4∣21−12−13305∣.\begin{aligned}& \begin{vmatrix} 2 & 1 & -1 \\ 8 & -4 & 12 \\ 3 & 0 & 5 \end{vmatrix} \\ &= 4\begin{vmatrix} 2 & 1 & -1 \\ 2 & -1 & 3 \\ 3 & 0 & 5 \end{vmatrix}.\end{aligned}
Justify which determinant property makes the identity hold.
Show worked solution
  1. Step 1: Compare the Rows

    Rows 1 and 3 are identical in the two matrices. Row 2 on the left, (8,−4,12)(8, -4, 12), is 4 times row 2 on the right, (2,−1,3)(2, -1, 3).
  2. Step 2: Name the Property

    If one row of a matrix is multiplied by kk, the determinant is multiplied by kk (Lay §3.2, Theorem 3). So the left side is 4 times the right-hand determinant.
  3. Step 3: Check Numerically

    The right-hand determinant is 2(−5−0)−1(10−9)+(−1)(0+3)=−10−1−3=−14.2(-5 - 0) - 1(10 - 9) + (-1)(0 + 3) = -10 - 1 - 3 = -14. The left-hand determinant is −56=4⋅(−14)-56 = 4 \cdot (-14).

Answer

The identity holds because scaling one row by 4 multiplies the determinant by 4 (both sides equal −56-56).

Question 12

6 points
Find the eigenvalues of
A=[7337].A = \begin{bmatrix} 7 & 3 \\ 3 & 7 \end{bmatrix}.
Show worked solution
  1. Step 1: Write the Characteristic Equation

    Subtract λ\lambda from both diagonal entries: det⁡(A−λI)=(7−λ)2−9.\det(A - \lambda I) = (7 - \lambda)^2 - 9.
  2. Step 2: Solve

    (7−λ)2=9(7 - \lambda)^2 = 9 gives 7−λ=±37 - \lambda = \pm 3, so λ=4\lambda = 4 or λ=10\lambda = 10. Expanded, the polynomial is λ2−14λ+40=(λ−4)(λ−10).\lambda^2 - 14\lambda + 40 = (\lambda - 4)(\lambda - 10).
  3. Step 3: Check

    The eigenvalues sum to the trace (4+10=144 + 10 = 14) and multiply to the determinant (4⋅10=49−9=404 \cdot 10 = 49 - 9 = 40).

Answer

λ=4\lambda = 4 and λ=10\lambda = 10

Question 13

6 points
Let A=PDP−1A = PDP^{-1} with
P=[1021],D=[200−1],A=[206−1].P = \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix},\qquad D = \begin{bmatrix} 2 & 0 \\ 0 & -1 \end{bmatrix},\qquad A = \begin{bmatrix} 2 & 0 \\ 6 & -1 \end{bmatrix}.
P=[1021]D=[200−1]A=[206−1].\begin{gathered}\begin{aligned}P &= \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} D &= \begin{bmatrix} 2 & 0 \\ 0 & -1 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} A &= \begin{bmatrix} 2 & 0 \\ 6 & -1 \end{bmatrix}.\end{aligned}\end{gathered}
Compute A3A^3 using A3=PD3P−1A^3 = PD^3P^{-1}. Show the full computation.
Show worked solution
  1. Step 1: Invert PP

    det⁡P=1\det P = 1, so P−1=[10−21].P^{-1} = \begin{bmatrix} 1 & 0 \\ -2 & 1 \end{bmatrix}.
  2. Step 2: Cube the Diagonal Matrix

    Cube each diagonal entry: D3=[800−1].D^3 = \begin{bmatrix} 8 & 0 \\ 0 & -1 \end{bmatrix}.
  3. Step 3: Multiply PP by D3D^3

    PD3=[8016−1].PD^3 = \begin{bmatrix} 8 & 0 \\ 16 & -1 \end{bmatrix}.
  4. Step 4: Multiply by P−1P^{-1}

    A3=PD3P−1=[8016−1][10−21]=[8018−1].A^3 = PD^3P^{-1} = \begin{bmatrix} 8 & 0 \\ 16 & -1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ -2 & 1 \end{bmatrix} = \begin{bmatrix} 8 & 0 \\ 18 & -1 \end{bmatrix}.
    A3=PD3P−1=[8016−1][10−21]=[8018−1].\begin{aligned}A^3 &= PD^3P^{-1} \\ &= \begin{bmatrix} 8 & 0 \\ 16 & -1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ -2 & 1 \end{bmatrix} \\ &= \begin{bmatrix} 8 & 0 \\ 18 & -1 \end{bmatrix}.\end{aligned}

Answer

A3=[8018−1]A^3 = \begin{bmatrix} 8 & 0 \\ 18 & -1 \end{bmatrix}

Question 14

6 points
Find a unit vector in the direction of v=⟨4,−2,2⟩\mathbf{v} = \langle 4, -2, 2 \rangle.
Show worked solution
  1. Step 1: Find the Length

    ∥v∥2=16+4+4=24\|\mathbf{v}\|^2 = 16 + 4 + 4 = 24, so ∥v∥=24=26\|\mathbf{v}\| = \sqrt{24} = 2\sqrt{6}.
  2. Step 2: Divide by the Length

    v∥v∥=126⟨4,−2,2⟩=⟨26,−16,16⟩.\frac{\mathbf{v}}{\|\mathbf{v}\|} = \frac{1}{2\sqrt6}\langle 4, -2, 2 \rangle = \left\langle \tfrac{2}{\sqrt6}, -\tfrac{1}{\sqrt6}, \tfrac{1}{\sqrt6} \right\rangle.
    v∥v∥=126⟨4,−2,2⟩=⟨26,−16,16⟩.\begin{aligned}& \frac{\mathbf{v}}{\|\mathbf{v}\|} \\ &= \frac{1}{2\sqrt6}\langle 4, -2, 2 \rangle \\ &= \left\langle \tfrac{2}{\sqrt6}, -\tfrac{1}{\sqrt6}, \tfrac{1}{\sqrt6} \right\rangle.\end{aligned}
  3. Step 3: Check

    The squared entries sum to 46+16+16=1\tfrac46 + \tfrac16 + \tfrac16 = 1.

Answer

16⟨2,−1,1⟩≈⟨0.816,−0.408,0.408⟩\tfrac{1}{\sqrt6}\langle 2, -1, 1 \rangle \approx \langle 0.816, -0.408, 0.408 \rangle

Question 15

6 points
Find a least-squares solution x^\hat{\mathbf{x}} of Ax=bA\mathbf{x} = \mathbf{b} for
A=[132−1−21],b=[−15−5].A = \begin{bmatrix} 1 & 3 \\ 2 & -1 \\ -2 & 1 \end{bmatrix},\qquad \mathbf{b} = \begin{bmatrix} -1 \\ 5 \\ -5 \end{bmatrix}.
A=[132−1−21]b=[−15−5].\begin{gathered}\begin{aligned}A &= \begin{bmatrix} 1 & 3 \\ 2 & -1 \\ -2 & 1 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} \mathbf{b} &= \begin{bmatrix} -1 \\ 5 \\ -5 \end{bmatrix}.\end{aligned}\end{gathered}
Set up and solve the normal equations ATAx^=ATbA^T A \hat{\mathbf{x}} = A^T \mathbf{b}.
Show worked solution
  1. Step 1: Compute ATAA^TA

    ATA=[1+4+43−2−23−2−29+1+1]=[9−1−111]A^TA = \begin{bmatrix} 1 + 4 + 4 & 3 - 2 - 2 \\ 3 - 2 - 2 & 9 + 1 + 1 \end{bmatrix} = \begin{bmatrix} 9 & -1 \\ -1 & 11 \end{bmatrix}
    ATA=[1+4+43−2−23−2−29+1+1]=[9−1−111]\begin{aligned}A^TA &= \begin{bmatrix} 1 + 4 + 4 & 3 - 2 - 2 \\ 3 - 2 - 2 & 9 + 1 + 1 \end{bmatrix} \\ &= \begin{bmatrix} 9 & -1 \\ -1 & 11 \end{bmatrix}\end{aligned}
  2. Step 2: Compute ATbA^T\mathbf{b}

    ATb=[−1+10+10−3−5−5]=[19−13]A^T\mathbf{b} = \begin{bmatrix} -1 + 10 + 10 \\ -3 - 5 - 5 \end{bmatrix} = \begin{bmatrix} 19 \\ -13 \end{bmatrix}
    ATb=[−1+10+10−3−5−5]=[19−13]\begin{aligned}A^T\mathbf{b} &= \begin{bmatrix} -1 + 10 + 10 \\ -3 - 5 - 5 \end{bmatrix} \\ &= \begin{bmatrix} 19 \\ -13 \end{bmatrix}\end{aligned}
  3. Step 3: Solve the 2×22 \times 2 System

    det⁡(ATA)=99−1=98\det(A^TA) = 99 - 1 = 98, so
    x^=198[11119][19−13]=198[196−98]=[2−1].\hat{\mathbf{x}} = \frac{1}{98}\begin{bmatrix} 11 & 1 \\ 1 & 9 \end{bmatrix}\begin{bmatrix} 19 \\ -13 \end{bmatrix} = \frac{1}{98}\begin{bmatrix} 196 \\ -98 \end{bmatrix} = \begin{bmatrix} 2 \\ -1 \end{bmatrix}.
    x^=198[11119][19−13]=198[196−98]=[2−1].\begin{aligned}\hat{\mathbf{x}} &= \frac{1}{98}\begin{bmatrix} 11 & 1 \\ 1 & 9 \end{bmatrix}\begin{bmatrix} 19 \\ -13 \end{bmatrix} \\ &= \frac{1}{98}\begin{bmatrix} 196 \\ -98 \end{bmatrix} \\ &= \begin{bmatrix} 2 \\ -1 \end{bmatrix}.\end{aligned}
  4. Step 4: Interpret

    Here Ax^=bA\hat{\mathbf{x}} = \mathbf{b} exactly, so b\mathbf{b} happens to lie in Col⁡A\operatorname{Col} A and the least-squares error is 0.

Answer

x^=(2,−1)T\hat{\mathbf{x}} = (2, -1)^T

Section 2: Short Answer Questions

Five problems with several steps or a written justification.

Question 16

18 points
Find the LULU factorization of
A=[132−1−1−32010].A = \begin{bmatrix} 1 & 3 & 2 \\ -1 & -1 & -3 \\ 2 & 0 & 10 \end{bmatrix}.
A=[132−1−1−32010].\begin{aligned}A &= \begin{bmatrix} 1 & 3 & 2 \\ -1 & -1 & -3 \\ 2 & 0 & 10 \end{bmatrix}.\end{aligned}
Use the factorization to solve Ax=bA\mathbf{x} = \mathbf{b} for b=(2,0,7)T\mathbf{b} = (2, 0, 7)^T via forward and back substitution. Show all of LL, UU, y\mathbf{y}, and x\mathbf{x}.
Show worked solution
  1. Step 1: Eliminate in Column 1

    R2→R2+R1R_2 \to R_2 + R_1 gives (0,2,−1)(0, 2, -1), so the multiplier is −1-1. R3→R3−2R1R_3 \to R_3 - 2R_1 gives (0,−6,6)(0, -6, 6), so the multiplier is 22.
  2. Step 2: Eliminate in Column 2

    R3→R3+3R2R_3 \to R_3 + 3R_2 gives (0,0,3)(0, 0, 3), so the multiplier is −3-3. No row swaps were needed.
  3. Step 3: Write LL and UU

    LL holds the multipliers below its diagonal, and UU is the echelon form:
    L=[100−1102−31],U=[13202−1003].L = \begin{bmatrix} 1 & 0 & 0 \\ -1 & 1 & 0 \\ 2 & -3 & 1 \end{bmatrix},\qquad U = \begin{bmatrix} 1 & 3 & 2 \\ 0 & 2 & -1 \\ 0 & 0 & 3 \end{bmatrix}.
    L=[100−1102−31]U=[13202−1003].\begin{gathered}\begin{aligned}L &= \begin{bmatrix} 1 & 0 & 0 \\ -1 & 1 & 0 \\ 2 & -3 & 1 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} U &= \begin{bmatrix} 1 & 3 & 2 \\ 0 & 2 & -1 \\ 0 & 0 & 3 \end{bmatrix}.\end{aligned}\end{gathered}
  4. Step 4: Forward Substitution

    Solve Ly=bL\mathbf{y} = \mathbf{b} from the top: y1=2y_1 = 2; −y1+y2=0-y_1 + y_2 = 0 gives y2=2y_2 = 2; 2y1−3y2+y3=72y_1 - 3y_2 + y_3 = 7 gives y3=7−4+6=9y_3 = 7 - 4 + 6 = 9.
  5. Step 5: Back Substitution

    Solve Ux=yU\mathbf{x} = \mathbf{y} from the bottom: 3x3=93x_3 = 9 gives x3=3x_3 = 3; 2x2−x3=22x_2 - x_3 = 2 gives x2=52x_2 = \tfrac52; x1+3x2+2x3=2x_1 + 3x_2 + 2x_3 = 2 gives x1=2−152−6=−232.x_1 = 2 - \tfrac{15}{2} - 6 = -\tfrac{23}{2}.
  6. Step 6: Check

    Multiply out LULU to get AA back, and check Ax=bA\mathbf{x} = \mathbf{b}: row 1 gives −232+152+6=2-\tfrac{23}{2} + \tfrac{15}{2} + 6 = 2.

Answer

LL and UU as above; y=(2,2,9)T\mathbf{y} = (2, 2, 9)^T; x=(−232,52,3)T\mathbf{x} = \left(-\tfrac{23}{2}, \tfrac{5}{2}, 3\right)^T

Question 17

18 points
True or false, with justification: 'If u\mathbf{u}, v\mathbf{v} and w\mathbf{w} are vectors in a vector space VV and u+w=v+w,\mathbf{u} + \mathbf{w} = \mathbf{v} + \mathbf{w}, then u=v\mathbf{u} = \mathbf{v}.' State T or F, and justify in 2 to 3 sentences.
Show worked solution
  1. Step 1: Decide

    True.
  2. Step 2: Use the Additive Inverse

    The axioms guarantee a vector −w-\mathbf{w} with w+(−w)=0\mathbf{w} + (-\mathbf{w}) = \mathbf{0}. Add it to both sides of u+w=v+w.\mathbf{u} + \mathbf{w} = \mathbf{v} + \mathbf{w}.
  3. Step 3: Regroup and Simplify

    By associativity, u+(w+(−w))=v+(w+(−w)),\mathbf{u} + (\mathbf{w} + (-\mathbf{w})) = \mathbf{v} + (\mathbf{w} + (-\mathbf{w})), which is u+0=v+0.\mathbf{u} + \mathbf{0} = \mathbf{v} + \mathbf{0}. The zero-vector axiom then gives u=v\mathbf{u} = \mathbf{v}.
  4. Step 4: What a Full Answer Looks Like

    A complete justification names the axioms it uses (additive inverse, associativity, zero vector). Saying only 'subtract w\mathbf{w} from both sides' skips the reason subtraction is allowed in a general vector space.

Answer

T. Add −w-\mathbf{w} to both sides, regroup by associativity, and use w+(−w)=0\mathbf{w} + (-\mathbf{w}) = \mathbf{0} and u+0=u\mathbf{u} + \mathbf{0} = \mathbf{u}.

Question 18

18 points
True or false, with justification: 'A mapping T:Rn→RmT:\mathbb{R}^n \to \mathbb{R}^m is onto Rm\mathbb{R}^m if every vector x\mathbf{x} in Rn\mathbb{R}^n maps to some vector in Rm\mathbb{R}^m.' State T or F, and justify in 2 to 3 sentences.
Show worked solution
  1. Step 1: Decide

    False.
  2. Step 2: Spot the Trap

    Every mapping sends each input to some output; that is what it means to be a mapping. So the stated property holds for every TT and cannot separate onto maps from the rest.
  3. Step 3: State the Correct Definition

    TT is onto Rm\mathbb{R}^m when every b\mathbf{b} in Rm\mathbb{R}^m is the image of at least one x\mathbf{x} in Rn\mathbb{R}^n. The condition is about the outputs, not the inputs.
  4. Step 4: Give a Counterexample

    The zero map T(x)=0T(\mathbf{x}) = \mathbf{0} sends every x\mathbf{x} to a vector in Rm\mathbb{R}^m, yet nothing maps to a nonzero b\mathbf{b}, so it is not onto.

Answer

F. Every mapping has the stated property; onto means every b\mathbf{b} in Rm\mathbb{R}^m has at least one preimage, which the zero map fails.

Question 19

18 points
True or false, with justification: 'If an n×nn \times n matrix AA is diagonalizable, then AA has nn distinct eigenvalues.' State T or F, and justify in 2 to 3 sentences.
Show worked solution
  1. Step 1: Decide

    False.
  2. Step 2: Recall the Diagonalization Theorem

    AA is diagonalizable exactly when it has nn linearly independent eigenvectors (Lay §5.3, Theorem 5). The theorem says nothing about the eigenvalues being distinct.
  3. Step 3: Give a Counterexample

    The identity matrix InI_n is diagonal, so it is diagonalizable (take P=IP = I, D=ID = I). Its only eigenvalue is 1, repeated nn times.
  4. Step 4: Name the Correct Relationship

    Distinct eigenvalues guarantee diagonalizability (Lay §5.3, Theorem 6), but the reverse fails: a repeated eigenvalue is fine as long as its eigenspace supplies enough independent eigenvectors.

Answer

F. The identity matrix is diagonalizable with the single eigenvalue 1.

Question 20

18 points
Let
y=[17],u1=[2/5−1/5],\mathbf{y} = \begin{bmatrix} 1 \\ 7 \end{bmatrix},\qquad \mathbf{u}_1 = \begin{bmatrix} 2/\sqrt{5} \\ -1/\sqrt{5} \end{bmatrix},
y=[17]u1=[2/5−1/5],\begin{gathered}\begin{aligned}\mathbf{y} &= \begin{bmatrix} 1 \\ 7 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} \mathbf{u}_1 &= \begin{bmatrix} 2/\sqrt{5} \\ -1/\sqrt{5} \end{bmatrix},\end{aligned}\end{gathered}
W=Span⁡{u1}W = \operatorname{Span}\{\mathbf{u}_1\}, and let UU be the 2×12 \times 1 matrix whose only column is u1\mathbf{u}_1. Compute UTUU^TU, UUTUU^T, proj⁡Wy\operatorname{proj}_W \mathbf{y}, and (UUT)y(UU^T)\mathbf{y}.
Show worked solution
  1. Step 1: Compute UTUU^TU

    UTU=45+15=1U^TU = \tfrac45 + \tfrac15 = 1, a 1×11 \times 1 matrix [1][1]. This confirms u1\mathbf{u}_1 is a unit vector.
  2. Step 2: Compute UUTUU^T

    UUTUU^T is 2×22 \times 2:
    UUT=[4/5−2/5−2/51/5]UU^T = \begin{bmatrix} 4/5 & -2/5 \\ -2/5 & 1/5 \end{bmatrix}
    UUT=[4/5−2/5−2/51/5]\begin{aligned}UU^T &= \begin{bmatrix} 4/5 & -2/5 \\ -2/5 & 1/5 \end{bmatrix}\end{aligned}
  3. Step 3: Project y\mathbf{y}

    y⋅u1=2−75=−55=−5,\mathbf{y} \cdot \mathbf{u}_1 = \tfrac{2 - 7}{\sqrt5} = -\tfrac{5}{\sqrt5} = -\sqrt5, so proj⁡Wy=(y⋅u1)u1=−5(25,−15)T=(−2,1)T.\operatorname{proj}_W \mathbf{y} = (\mathbf{y} \cdot \mathbf{u}_1)\mathbf{u}_1 = -\sqrt5\left(\tfrac{2}{\sqrt5}, -\tfrac{1}{\sqrt5}\right)^T = (-2, 1)^T.
  4. Step 4: Multiply by the Projection Matrix

    (UUT)y=(4−145,−2+75)T=(−2,1)T,(UU^T)\mathbf{y} = \left(\tfrac{4 - 14}{5}, \tfrac{-2 + 7}{5}\right)^T = (-2, 1)^T, the same vector. That is the point: UUTUU^T is the matrix of projection onto WW.

Answer

UTU=[1]U^TU = [1]; UUT=[4/5−2/5−2/51/5];UU^T = \begin{bmatrix} 4/5 & -2/5 \\ -2/5 & 1/5 \end{bmatrix}; proj⁡Wy=(UUT)y=(−2,1)T\operatorname{proj}_W\mathbf{y} = (UU^T)\mathbf{y} = (-2, 1)^T

Section 3: Long Answer Questions

Three multi-part problems. Show every step.

Question 21

44 points
(True/False discussion) 'If AA is a 3×33 \times 3 matrix with det⁡A=0\det A = 0, then the equation Ax=bA\mathbf{x} = \mathbf{b} has no solution for every b\mathbf{b} in R3\mathbb{R}^3.' Decide T/F, justify carefully, and discuss the underlying invertibility analysis and the geometric meaning of the determinant. State your T/F decision and write your full justification and discussion (at least one page).
Show worked solution
  1. Step 1: Decide

    False. A single counterexample is enough: take b=0\mathbf{b} = \mathbf{0}. The equation Ax=0A\mathbf{x} = \mathbf{0} always has the solution x=0\mathbf{x} = \mathbf{0}, whatever AA is.
  2. Step 2: Justify With the Invertible Matrix Theorem

    det⁡A=0\det A = 0 means AA is not invertible, so Ax=bA\mathbf{x} = \mathbf{b} cannot have a unique solution for every b\mathbf{b}. That is a weaker statement than 'no solution for any b\mathbf{b}'.
  3. Step 3: Analyze What Happens When det⁡A=0\det A = 0

    For a singular AA, the columns are dependent, so Col⁡A\operatorname{Col} A is a plane, a line, or the origin. If b\mathbf{b} is outside Col⁡A\operatorname{Col} A, there is no solution. If b\mathbf{b} is inside, there are infinitely many, because Nul⁡A\operatorname{Nul} A contains a nonzero vector that can be added to any solution.
  4. Step 4: Give a Concrete Example

    Let A=[120240001],A = \begin{bmatrix} 1 & 2 & 0 \\ 2 & 4 & 0 \\ 0 & 0 & 1 \end{bmatrix}, so det⁡A=0\det A = 0. For b=(1,2,5)T\mathbf{b} = (1, 2, 5)^T, the solutions are x=(1,0,5)T+t(−2,1,0)T\mathbf{x} = (1, 0, 5)^T + t(-2, 1, 0)^T, infinitely many. For b=(1,0,0)T\mathbf{b} = (1, 0, 0)^T, rows 1 and 2 demand x1+2x2=1x_1 + 2x_2 = 1 and 2x1+4x2=02x_1 + 4x_2 = 0, which is impossible.
  5. Step 5: Explain the Geometry

    ∣det⁡A∣|\det A| is the volume of the parallelepiped spanned by the columns of AA, and it is the factor by which x↦Ax\mathbf{x} \mapsto A\mathbf{x} scales volumes. det⁡A=0\det A = 0 means that parallelepiped is flat: the map collapses R3\mathbb{R}^3 onto a plane or a line. Vectors on that flattened image are reached by infinitely many inputs (the collapse loses a direction), and vectors off it are not reached at all.
  6. Step 6: What a Full Answer Contains

    A complete answer has four parts: the decision with a counterexample, the link from det⁡A=0\det A = 0 to non-invertibility, the no-solution-or-infinitely-many analysis, and the volume picture. Each part needs only a few sentences.

Answer

F. b=0\mathbf{b} = \mathbf{0} always has a solution; in general a singular AA gives no solution for b\mathbf{b} outside Col⁡A\operatorname{Col} A and infinitely many for b\mathbf{b} inside it.

Question 22

44 points
Consider
A=[4123],A = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix},
with eigenvalues λ1=5\lambda_1 = 5, λ2=2\lambda_2 = 2 and eigenspace bases Span⁡{(1,1)T}\operatorname{Span}\{(1, 1)^T\} and Span⁡{(1,−2)T}\operatorname{Span}\{(1, -2)^T\} respectively. One diagonalization is
P=[111−2],D=[5002],A=PDP−1.P = \begin{bmatrix} 1 & 1 \\ 1 & -2 \end{bmatrix},\quad D = \begin{bmatrix} 5 & 0 \\ 0 & 2 \end{bmatrix},\quad A = PDP^{-1}.
P=[111−2]D=[5002]A=PDP−1.\begin{gathered}\begin{aligned}P &= \begin{bmatrix} 1 & 1 \\ 1 & -2 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} D &= \begin{bmatrix} 5 & 0 \\ 0 & 2 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} A &= PDP^{-1}.\end{aligned}\end{gathered}
Find a different invertible matrix P2P_2 (with the same diagonal DD) such that A=P2DP2−1A = P_2 D P_2^{-1}. Show your construction and reasoning.
Show worked solution
  1. Step 1: Say What P2P_2 Must Do

    A=P2DP2−1A = P_2DP_2^{-1} holds exactly when AP2=P2DAP_2 = P_2D and P2P_2 is invertible. Column by column, that says column 1 of P2P_2 is an eigenvector for 5, column 2 is an eigenvector for 2, and the columns are independent.
  2. Step 2: Use the Freedom in Each Eigenspace

    Each eigenspace is a line, so any nonzero multiple of an eigenvector is still an eigenvector. The columns may be c1(1,1)Tc_1(1, 1)^T and c2(1,−2)Tc_2(1, -2)^T for any nonzero c1,c2c_1, c_2, kept in that order to match DD.
  3. Step 3: Construct P2P_2

    Take c1=3c_1 = 3 and c2=−1c_2 = -1:
    P2=[3−132].P_2 = \begin{bmatrix} 3 & -1 \\ 3 & 2 \end{bmatrix}.
  4. Step 4: Check Invertibility

    det⁡P2=(3)(2)−(−1)(3)=9≠0.\det P_2 = (3)(2) - (-1)(3) = 9 \neq 0.
    det⁡P2=(3)(2)−(−1)(3)=9≠0.\begin{aligned}\det P_2 &= (3)(2) - (-1)(3) \\ &= 9 \\ &\neq 0.\end{aligned}
  5. Step 5: Check the Eigenvectors

    A(3,3)T=(15,15)T=5(3,3)TA(3, 3)^T = (15, 15)^T = 5(3, 3)^T and A(−1,2)T=(−2,4)T=2(−1,2)TA(-1, 2)^T = (-2, 4)^T = 2(-1, 2)^T.
  6. Step 6: Confirm the Product

    P2−1=19[21−33],P2D=[15−2154],P2DP2−1=19[3691827]=[4123]=A.P_2^{-1} = \frac19\begin{bmatrix} 2 & 1 \\ -3 & 3 \end{bmatrix},\quad P_2D = \begin{bmatrix} 15 & -2 \\ 15 & 4 \end{bmatrix},\quad P_2DP_2^{-1} = \frac19\begin{bmatrix} 36 & 9 \\ 18 & 27 \end{bmatrix} = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix} = A.
    P2−1=19[21−33]P2D=[15−2154]P2DP2−1=19[3691827]=[4123]=A.\begin{gathered}\begin{aligned}P_2^{-1} &= \frac19\begin{bmatrix} 2 & 1 \\ -3 & 3 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} P_2D &= \begin{bmatrix} 15 & -2 \\ 15 & 4 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} P_2DP_2^{-1} &= \frac19\begin{bmatrix} 36 & 9 \\ 18 & 27 \end{bmatrix} \\ &= \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix} \\ &= A.\end{aligned}\end{gathered}
  7. Step 7: The General Answer

    Every valid answer has the form P2=[c1c2c1−2c2]P_2 = \begin{bmatrix} c_1 & c_2 \\ c_1 & -2c_2 \end{bmatrix} with c1,c2≠0c_1, c_2 \neq 0, not both equal to 1. Swapping the columns would require swapping the diagonal of DD too, so it does not count here.

Answer

For example P2=[3−132];P_2 = \begin{bmatrix} 3 & -1 \\ 3 & 2 \end{bmatrix}; any nonzero rescaling of the columns of PP (other than PP itself) works.

Question 23

44 points
Let
A=[452036].A = \begin{bmatrix} 4 & 5 & 2 \\ 0 & 3 & 6 \end{bmatrix}.
Complete all parts: (a) Compute ATAA^T A and find its eigenvalues (the squared singular values). (b) State the singular values σ1,σ2\sigma_1, \sigma_2 of AA (in decreasing order). (c) Compute the SVD A=UΣVTA = U\Sigma V^T explicitly. (d) Write the best rank-1 approximation A1=σ1u1v1TA_1 = \sigma_1 \mathbf{u}_1 \mathbf{v}_1^T as a 2×32 \times 3 matrix. (e) In one sentence, explain what the rank-1 approximation represents geometrically (cite Eckart-Young).
Show worked solution
  1. Step 1: (a) Compute ATAA^TA

    ATA=[1620820342882840]A^TA = \begin{bmatrix} 16 & 20 & 8 \\ 20 & 34 & 28 \\ 8 & 28 & 40 \end{bmatrix}
    ATA=[1620820342882840]\begin{aligned}A^TA &= \begin{bmatrix} 16 & 20 & 8 \\ 20 & 34 & 28 \\ 8 & 28 & 40 \end{bmatrix}\end{aligned}
  2. Step 2: (a) Find Its Eigenvalues

    ATAA^TA is 3×33 \times 3 with rank at most 2, so 0 is an eigenvalue. The nonzero pair is easiest from the 2×22 \times 2 matrix AAT=[45272745],AA^T = \begin{bmatrix} 45 & 27 \\ 27 & 45 \end{bmatrix}, which has the same nonzero eigenvalues: (45−λ)2=272(45 - \lambda)^2 = 27^2 gives λ=72\lambda = 72 or 1818. So the eigenvalues of ATAA^TA are 7272, 1818, 00.
  3. Step 3: (b) Take Square Roots

    σ1=72=62≈8.485\sigma_1 = \sqrt{72} = 6\sqrt2 \approx 8.485 and σ2=18=32≈4.243.\sigma_2 = \sqrt{18} = 3\sqrt2 \approx 4.243.
  4. Step 4: (c) Find the Right Singular Vectors

    Solve (ATA−λI)v=0(A^TA - \lambda I)\mathbf{v} = \mathbf{0} and normalize. For λ=72\lambda = 72: v1=13(1,2,2)T\mathbf{v}_1 = \tfrac13(1, 2, 2)^T. For λ=18\lambda = 18: v2=13(2,1,−2)T\mathbf{v}_2 = \tfrac13(2, 1, -2)^T. For λ=0\lambda = 0: v3=13(2,−2,1)T\mathbf{v}_3 = \tfrac13(2, -2, 1)^T. Check one: Av3=13(8−10+2, 0−6+6)T=0.A\mathbf{v}_3 = \tfrac13(8 - 10 + 2,\ 0 - 6 + 6)^T = \mathbf{0}.
  5. Step 5: (c) Find the Left Singular Vectors

    Use ui=1σiAvi.\mathbf{u}_i = \tfrac{1}{\sigma_i}A\mathbf{v}_i. Av1=(6,6)TA\mathbf{v}_1 = (6, 6)^T, so u1=162(6,6)T=12(1,1)T.\mathbf{u}_1 = \tfrac{1}{6\sqrt2}(6, 6)^T = \tfrac{1}{\sqrt2}(1, 1)^T. Av2=(3,−3)TA\mathbf{v}_2 = (3, -3)^T, so u2=12(1,−1)T.\mathbf{u}_2 = \tfrac{1}{\sqrt2}(1, -1)^T.
  6. Step 6: (c) Assemble the SVD

    U=12[111−1],Σ=[62000320],V=13[12221−22−21],U = \frac{1}{\sqrt2}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix},\quad \Sigma = \begin{bmatrix} 6\sqrt2 & 0 & 0 \\ 0 & 3\sqrt2 & 0 \end{bmatrix},\quad V = \frac13\begin{bmatrix} 1 & 2 & 2 \\ 2 & 1 & -2 \\ 2 & -2 & 1 \end{bmatrix},
    U=12[111−1]Σ=[62000320]V=13[12221−22−21],\begin{gathered}\begin{aligned}U &= \frac{1}{\sqrt2}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} \Sigma &= \begin{bmatrix} 6\sqrt2 & 0 & 0 \\ 0 & 3\sqrt2 & 0 \end{bmatrix}\end{aligned} \\[6pt] \begin{aligned} V &= \frac13\begin{bmatrix} 1 & 2 & 2 \\ 2 & 1 & -2 \\ 2 & -2 & 1 \end{bmatrix},\end{aligned}\end{gathered}
    and A=UΣVTA = U\Sigma V^T. You may flip the sign of any vi\mathbf{v}_i as long as you flip the matching ui\mathbf{u}_i.
  7. Step 7: (d) Build the Rank-1 Approximation

    A1=σ1u1v1T=62⋅12⋅13[122122]=[244244]A_1 = \sigma_1\mathbf{u}_1\mathbf{v}_1^T = 6\sqrt2 \cdot \tfrac{1}{\sqrt2} \cdot \tfrac13\begin{bmatrix} 1 & 2 & 2 \\ 1 & 2 & 2 \end{bmatrix} = \begin{bmatrix} 2 & 4 & 4 \\ 2 & 4 & 4 \end{bmatrix}
    A1=σ1u1v1T=62⋅12⋅13[122122]=[244244]\begin{aligned}A_1 &= \sigma_1\mathbf{u}_1\mathbf{v}_1^T \\ &= 6\sqrt2 \cdot \tfrac{1}{\sqrt2} \cdot \tfrac13\begin{bmatrix} 1 & 2 & 2 \\ 1 & 2 & 2 \end{bmatrix} \\ &= \begin{bmatrix} 2 & 4 & 4 \\ 2 & 4 & 4 \end{bmatrix}\end{aligned}
  8. Step 8: (e) Interpret

    A1A_1 keeps only the strongest direction of AA: it takes the component of an input along v1\mathbf{v}_1, stretches it by σ1\sigma_1, and sends it along the single line through u1\mathbf{u}_1. By the Eckart-Young theorem, no rank-1 matrix is closer to AA.

Answer

σ1=62\sigma_1 = 6\sqrt2, σ2=32\sigma_2 = 3\sqrt2; UU, Σ\Sigma, VV as above; A1=[244244]A_1 = \begin{bmatrix} 2 & 4 & 4 \\ 2 & 4 & 4 \end{bmatrix}

Section 4: Synthesis Question

One derivation that pulls several units together.

Question 24

33 points
Find a formula for the least-squares solution of Ax=bA\mathbf{x} = \mathbf{b} when the columns of AA are nonzero and orthogonal (but not necessarily unit vectors). Derive the formula starting from the normal equations ATAx^=ATbA^T A \hat{\mathbf{x}} = A^T \mathbf{b} and simplifying using the orthogonality assumption. Discuss why this simplification holds and how the formula relates to the orthonormal and general cases.
Show worked solution
  1. Step 1: Start From the Normal Equations

    Let A=[a1⋯an]A = [\mathbf{a}_1 \cdots \mathbf{a}_n]. Every least-squares solution satisfies ATAx^=ATbA^TA\hat{\mathbf{x}} = A^T\mathbf{b}.
  2. Step 2: Read the Entries of ATAA^TA

    Entry (i,j)(i, j) of ATAA^TA is ai⋅aj\mathbf{a}_i \cdot \mathbf{a}_j. Orthogonality makes every off-diagonal entry 0, so ATAA^TA is diagonal with entries ai⋅ai=∥ai∥2.\mathbf{a}_i \cdot \mathbf{a}_i = \|\mathbf{a}_i\|^2.
  3. Step 3: Solve the Diagonal System

    Entry ii of ATbA^T\mathbf{b} is ai⋅b\mathbf{a}_i \cdot \mathbf{b}. A diagonal system splits into nn separate equations ∥ai∥2x^i=ai⋅b,\|\mathbf{a}_i\|^2\hat{x}_i = \mathbf{a}_i \cdot \mathbf{b}, so
    x^i=ai⋅bai⋅ai.\hat{x}_i = \frac{\mathbf{a}_i \cdot \mathbf{b}}{\mathbf{a}_i \cdot \mathbf{a}_i}.
    x^i=ai⋅bai⋅ai.\begin{aligned}\hat{x}_i &= \frac{\mathbf{a}_i \cdot \mathbf{b}}{\mathbf{a}_i \cdot \mathbf{a}_i}.\end{aligned}
  4. Step 4: Explain Why It Simplifies

    In general the normal equations couple every unknown, because ATAA^TA records how each column overlaps the others. Orthogonal columns do not overlap, so each coefficient depends on one column only, and x^iai\hat{x}_i \mathbf{a}_i is the projection of b\mathbf{b} onto the line through ai\mathbf{a}_i (Lay §6.3).
  5. Step 5: Relate It to the Other Cases

    If the columns are also unit vectors, ai⋅ai=1\mathbf{a}_i \cdot \mathbf{a}_i = 1 and the formula becomes x^=ATb\hat{\mathbf{x}} = A^T\mathbf{b}. If the columns are independent but not orthogonal, ATAA^TA is not diagonal and you need x^=(ATA)−1ATb,\hat{\mathbf{x}} = (A^TA)^{-1}A^T\mathbf{b}, or the QR route x^=R−1QTb\hat{\mathbf{x}} = R^{-1}Q^T\mathbf{b}.
  6. Step 6: Test It on an Example

    Take A=[121−11−1]A = \begin{bmatrix} 1 & 2 \\ 1 & -1 \\ 1 & -1 \end{bmatrix} and b=(6,0,3)T\mathbf{b} = (6, 0, 3)^T. The columns are orthogonal (2−1−1=02 - 1 - 1 = 0). The formula gives x^1=93=3\hat{x}_1 = \tfrac93 = 3 and x^2=12−0−36=32,\hat{x}_2 = \tfrac{12 - 0 - 3}{6} = \tfrac32, which matches solving [3006]x^=[99]\begin{bmatrix} 3 & 0 \\ 0 & 6 \end{bmatrix}\hat{\mathbf{x}} = \begin{bmatrix} 9 \\ 9 \end{bmatrix} directly. The shortcut ATb=(9,9)TA^T\mathbf{b} = (9, 9)^T is wrong here because the columns are not unit vectors.

Answer

x^i=ai⋅bai⋅ai;\hat{x}_i = \dfrac{\mathbf{a}_i \cdot \mathbf{b}}{\mathbf{a}_i \cdot \mathbf{a}_i}; it reduces to x^=ATb\hat{\mathbf{x}} = A^T\mathbf{b} for orthonormal columns and needs (ATA)−1ATb(A^TA)^{-1}A^T\mathbf{b} in general.