← Math 221Handout · Solutions↑ Top

Math 221, Fall 2026

Midterm 1 Solutions

Solutions

“Begin at the beginning,” the King said, very gravely,
“and go on till you come to the end: then stop.”

From Alice in Wonderland by Lewis Caroll

Name:

Instructions

You have 50 minutes. No calculators, notes, phones, or other aids are allowed. Show your work. There are 7 problems and 100 points in total, plus an optional extra credit problem worth 10 points.

Problem12345678 (EC)Total
Points12121212122020+10100
Score

Problem 1 · 12 points

Consider the system of linear equations

\[\begin{aligned} 2x_1 - x_2 + 3x_3 &= 4\\ x_1 + 5x_3 &= -2. \end{aligned}\]

Do not solve the system.

  1. Write the augmented matrix of the system.

    Solution

    \[ \left[\begin{array}{rrr|r} 2 & -1 & 3 & 4\\ 1 & 0 & 5 & -2 \end{array}\right]. \]

  2. Write the system as a vector equation.

    Solution

    \[ x_1 \begin{bmatrix} 2 \\ 1 \end{bmatrix} + x_2 \begin{bmatrix*}[r] -1 \\ 0 \end{bmatrix*} + x_3 \begin{bmatrix} 3 \\ 5 \end{bmatrix} = \begin{bmatrix*}[r] 4 \\ -2 \end{bmatrix*}. \]

  3. Write the system as a matrix equation $Ax = b$. Say explicitly what $A$, $x$, and $b$ are.

    Solution

    The equation is $Ax = b$ with \[ A = \begin{bmatrix*}[r] 2 & -1 & 3 \\ 1 & 0 & 5 \end{bmatrix*},\qquad x = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix},\qquad b = \begin{bmatrix*}[r] 4 \\ -2 \end{bmatrix*}. \]

Problem 2 · 12 points

Each of the following augmented matrices is in row echelon form. For each one, circle whether the corresponding system of linear equations has no solutions, one solution, or infinitely many solutions. If the system is consistent, also circle its free variables. You do not need to solve the systems.

  1. \( \blue{ \left[\begin{array}{rr|r} 1 & -2 & 4\\ 0 & 3 & 6\\ 0 & 0 & 0 \end{array}\right] } \)

    No solutions   One solution   Infinitely many solutions

    If consistent, circle the free variables:  $x_1$  $x_2$

    Solution

    One solution. The row of zeros is the equation $0 = 0$, which is always true, so the system is consistent. Both columns have pivots, so there are no free variables to circle and the solution is unique. (It is $x_2 = 2$ and $x_1 = 8$.)

  2. \( \blue{ \left[\begin{array}{rrr|r} 1 & -3 & 2 & 5\\ 0 & 2 & 1 & 1\\ 0 & 0 & 0 & 4 \end{array}\right] } \)

    No solutions   One solution   Infinitely many solutions

    If consistent, circle the free variables:  $x_1$  $x_2$  $x_3$

    Solution

    No solutions. The last row is the equation $0x_1 + 0x_2 + 0x_3 = 4$, which no values of $x_1, x_2, x_3$ can satisfy.

  3. \( \blue{ \left[\begin{array}{rrrr|r} 1 & 2 & 3 & -1 & 4\\ 0 & 0 & 1 & 3 & 2\\ 0 & 0 & 0 & 0 & 0 \end{array}\right] } \)

    No solutions   One solution   Infinitely many solutions

    If consistent, circle the free variables:  $x_1$  $x_2$  $x_3$  $x_4$

    Solution

    Infinitely many solutions. The system is consistent since the only zero row has a zero on the right. The pivots are in columns 1 and 3, so $x_2$ and $x_4$ are the free variables, and each choice of their values gives a different solution.

Problem 3 · 12 points

Let \[ A = \begin{bmatrix*}[r] 1 & 2 & 0 & -1\\ 3 & -1 & 2 & 1\\ 0 & 4 & -1 & 2\\ 2 & 1 & 1 & -3\\ -2 & 0 & 3 & 1 \end{bmatrix*},\qquad B = \begin{bmatrix*}[r] 2 & -1 & 0\\ 1 & 3 & -2\\ 0 & 5 & 1\\ 4 & -2 & 2 \end{bmatrix*}. \]

  1. What size is the matrix $AB$?

    Solution

    $A$ is $5 \times 4$ and $B$ is $4 \times 3$, so $AB$ is $5 \times 3$.

  2. Compute the entry in the 3rd row and 2nd column of $AB$.

    Solution

    This entry is the 3rd row of $A$ times the 2nd column of $B$: \[ (0)(-1) + (4)(3) + (-1)(5) + (2)(-2) = 0 + 12 - 5 - 4 = 3. \]

  3. Compute the entry in the 2nd row and 1st column of $AB$.

    Solution

    This entry is the 2nd row of $A$ times the 1st column of $B$: \[ (3)(2) + (-1)(1) + (2)(0) + (1)(4) = 6 - 1 + 0 + 4 = 9. \]

Problem 4 · 12 points

The vectors $v$ and $w$ are drawn on each grid below. On each grid, draw the requested vector.

  1. $v - w$

    Solution

    Reading off the grid, $v = (3, 1)$ and $w = (1, 2)$, so $v - w = (3, 1) - (1, 2) = (2, -1)$. Geometrically, $v - w$ is the arrow from the tip of $w$ to the tip of $v$, slid back to the origin.

  2. $2v + w$

    Solution

    We have $2v + w = (6, 2) + (1, 2) = (7, 4)$. First stretch $v$ to twice its length, then add $w$ tip to tail.

  3. $w - 2v$

    Solution

    We have $w - 2v = (1, 2) - (6, 2) = (-5, 0)$. First draw $-2v$, which points opposite to $v$ and is twice as long, then add $w$ tip to tail.

Problem 5 · 12 points

Let \[ v_1 = \begin{bmatrix} 2 \\ 2 \\ 4 \end{bmatrix},\quad v_2 = \begin{bmatrix} 3 \\ 8 \\ 1 \end{bmatrix},\quad v_3 = \begin{bmatrix*}[r] -1 \\ -4 \\ 1 \end{bmatrix*},\quad b = \begin{bmatrix} 4 \\ 5 \\ 7 \end{bmatrix}. \] How many ways are there to write $b$ as a linear combination of $v_1, v_2, v_3$? Circle one.

None   One   Infinitely many

Justify your answer. You only need to determine how many linear combinations there are. You do not need to find them.

Solution

Writing $b = x_1 v_1 + x_2 v_2 + x_3 v_3$ is the same as solving the system with augmented matrix $[\,v_1\ v_2\ v_3 \mid b\,]$, and the number of ways is the number of solutions of that system. We row reduce until we reach echelon form.

\[ \begin{aligned} &\left[\begin{array}{ccc|c} 2 & 3 & \llap{$-$}1 & 4 \\ 2 & 8 & \llap{$-$}4 & 5 \\ 4 & 1 & 1 & 7 \end{array}\right] \xrightarrow{R_{2} \to R_{2} - R_{1}} \left[\begin{array}{ccc|c} 2 & 3 & \llap{$-$}1 & 4 \\ 0 & 5 & \llap{$-$}3 & 1 \\ 4 & 1 & 1 & 7 \end{array}\right] \\[4pt] &\xrightarrow{R_{3} \to R_{3} - 2\,R_{1}} \left[\begin{array}{ccc|c} 2 & 3 & \llap{$-$}1 & 4 \\ 0 & 5 & \llap{$-$}3 & 1 \\ 0 & \llap{$-$}5 & 3 & \llap{$-$}1 \end{array}\right] \xrightarrow{R_{3} \to R_{3} + R_{2}} \left[\begin{array}{ccc|c} 2 & 3 & \llap{$-$}1 & 4 \\ 0 & 5 & \llap{$-$}3 & 1 \\ 0 & 0 & 0 & 0 \end{array}\right] \end{aligned} \] This matrix is in echelon form, and that is enough to count solutions. There is no row of the form $[\,0\ 0\ 0 \mid c\,]$ with $c \neq 0$, so the system is consistent. There are only two pivots for three unknowns, so $x_3$ is a free variable. A consistent system with a free variable has infinitely many solutions, so there are infinitely many ways to write $b$ as a linear combination of $v_1, v_2, v_3$.

Problem 6 · 20 points

Find the general solution (expressed in parametric form) of the vector equation \[ \blue{ x_1 \begin{bmatrix} 0 \\ 1 \\ 3 \end{bmatrix} + x_2 \begin{bmatrix} 0 \\ 2 \\ 6 \end{bmatrix} + x_3 \begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix} + x_4 \begin{bmatrix*}[r] -2 \\ 2 \\ 8 \end{bmatrix*} = \begin{bmatrix} 4 \\ 3 \\ 5 \end{bmatrix}. } \]

Solution

The vector equation is equivalent to a system of three equations in $x_1, x_2, x_3, x_4$ whose augmented matrix has the four vectors on the left as its columns and the vector on the right as its augmented column. We row reduce.

\[ \begin{aligned} &\left[\begin{array}{cccc|c} 0 & 0 & 2 & \llap{$-$}2 & 4 \\ 1 & 2 & 1 & 2 & 3 \\ 3 & 6 & 1 & 8 & 5 \end{array}\right] \xrightarrow{R_{1} \leftrightarrow R_{2}} \left[\begin{array}{cccc|c} 1 & 2 & 1 & 2 & 3 \\ 0 & 0 & 2 & \llap{$-$}2 & 4 \\ 3 & 6 & 1 & 8 & 5 \end{array}\right] \\[4pt] &\xrightarrow{R_{3} \to R_{3} - 3\,R_{1}} \left[\begin{array}{cccc|c} 1 & 2 & 1 & 2 & 3 \\ 0 & 0 & 2 & \llap{$-$}2 & 4 \\ 0 & 0 & \llap{$-$}2 & 2 & \llap{$-$}4 \end{array}\right] \xrightarrow{R_{2} \to \frac{1}{2}\,R_{2}} \left[\begin{array}{cccc|c} 1 & 2 & 1 & 2 & 3 \\ 0 & 0 & 1 & \llap{$-$}1 & 2 \\ 0 & 0 & \llap{$-$}2 & 2 & \llap{$-$}4 \end{array}\right] \\[4pt] &\xrightarrow{R_{3} \to R_{3} + 2\,R_{2}} \left[\begin{array}{cccc|c} 1 & 2 & 1 & 2 & 3 \\ 0 & 0 & 1 & \llap{$-$}1 & 2 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right] \xrightarrow{R_{1} \to R_{1} - R_{2}} \left[\begin{array}{cccc|c} 1 & 2 & 0 & 3 & 1 \\ 0 & 0 & 1 & \llap{$-$}1 & 2 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right] \end{aligned} \] The matrix is now in reduced row echelon form with pivots in columns 1 and 3, so $x_2$ and $x_4$ are free. Setting $x_2 = s$ and $x_4 = t$, the two nonzero rows say $x_1 + 2s + 3t = 1$ and $x_3 - t = 2$. The general solution is therefore \[ (x_1, x_2, x_3, x_4) = (1 - 2s - 3t,\ s,\ 2 + t,\ t), \] or equivalently \[ \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \\ 2 \\ 0 \end{bmatrix} + s \begin{bmatrix*}[r] -2 \\ 1 \\ 0 \\ 0 \end{bmatrix*} + t \begin{bmatrix*}[r] -3 \\ 0 \\ 1 \\ 1 \end{bmatrix*}. \]

Problem 7 · 20 points

Let $A$ be a matrix for which the vectors \[ v = \begin{bmatrix*}[r] -1 \\ 1 \\ 2 \\ 1 \end{bmatrix*},\qquad w = \begin{bmatrix*}[r] 5 \\ 1 \\ -2 \\ -1 \end{bmatrix*} \] are both solutions of the homogeneous equation $Ax = 0$. Find a solution \[ x = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} \] of $Ax = 0$ with $x_1 = 7$ and $x_2 = 5$.

Solution

The solution set of a homogeneous system is a span, so it contains every linear combination $sv + tw$ of the two solutions we are given. We look for $s$ and $t$ so that the first two coordinates of $sv + tw$ are $7$ and $5$:

\[\begin{aligned} -s + 5t &= 7\\ s + t &= 5. \end{aligned}\]

We row reduce.

\[ \begin{aligned} &\left[\begin{array}{cc|c} \llap{$-$}1 & 5 & 7 \\ 1 & 1 & 5 \end{array}\right] \xrightarrow{R_{1} \leftrightarrow R_{2}} \left[\begin{array}{cc|c} 1 & 1 & 5 \\ \llap{$-$}1 & 5 & 7 \end{array}\right] \xrightarrow{R_{2} \to R_{2} + R_{1}} \left[\begin{array}{cc|c} 1 & 1 & 5 \\ 0 & 6 & 12 \end{array}\right] \\[4pt] &\xrightarrow{R_{2} \to \frac{1}{6}\,R_{2}} \left[\begin{array}{cc|c} 1 & 1 & 5 \\ 0 & 1 & 2 \end{array}\right] \xrightarrow{R_{1} \to R_{1} - R_{2}} \left[\begin{array}{cc|c} 1 & 0 & 3 \\ 0 & 1 & 2 \end{array}\right] \end{aligned} \] So $s = 3$ and $t = 2$, which gives \[ x = 3v + 2w = \begin{bmatrix*}[r] -3 \\ 3 \\ 6 \\ 3 \end{bmatrix*} + \begin{bmatrix*}[r] 10 \\ 2 \\ -4 \\ -2 \end{bmatrix*} = \begin{bmatrix} 7 \\ 5 \\ 2 \\ 1 \end{bmatrix}. \] The first two coordinates are $7$ and $5$ as required, and $x$ solves $Ax = 0$ because it is a linear combination of solutions.

Problem 8 · 10 points

This problem is optional and counts for extra credit. Let \[ A = \begin{bmatrix} 1 & 2 & 0 & 3\\ 2 & 4 & 1 & 5 \end{bmatrix}. \]

Find a $4 \times 2$ matrix $B$ such that $AB$ is the zero matrix and the columns of $B$ span a plane.

Solution

The first column of $AB$ is $A$ times the first column of $B$, and the second column of $AB$ is $A$ times the second column of $B$. So $AB = 0$ exactly when both columns of $B$ are solutions of the homogeneous equation $Ax = 0$. We find those solutions by row reducing.

\[ \begin{bmatrix} 1 & 2 & 0 & 3 \\ 2 & 4 & 1 & 5 \end{bmatrix} \xrightarrow{R_{2} \to R_{2} - 2\,R_{1}} \begin{bmatrix} 1 & 2 & 0 & 3 \\ 0 & 0 & 1 & \llap{$-$}1 \end{bmatrix} \] The pivots are in columns 1 and 3, so $x_2 = s$ and $x_4 = t$ are free, and the general solution is \[ (x_1, x_2, x_3, x_4) = (-2s - 3t,\ s,\ t,\ t) = s\,(-2, 1, 0, 0) + t\,(-3, 0, 1, 1). \] So the solution set is $\sp\{u, w\}$ with $u = (-2, 1, 0, 0)$ and $w = (-3, 0, 1, 1)$. Taking these as the columns of $B$ gives \[ B = \begin{bmatrix*}[r] -2 & -3\\ 1 & 0\\ 0 & 1\\ 0 & 1 \end{bmatrix*}, \qquad AB = \begin{bmatrix} -2 + 2 + 0 + 0 & -3 + 0 + 0 + 3\\ -4 + 4 + 0 + 0 & -6 + 0 + 1 + 5 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}. \] The columns $u$ and $w$ are not multiples of each other, so their span is a plane rather than a line.