About

1.4 The Matrix Equation Ax = b

Theory: The Matrix Equation Ax=bA\mathbf{x} = \mathbf{b}

The Product AxA\mathbf{x} (Lay §1.4)

Definition: If A=[a1 a2 ⋯ an]A = [\mathbf{a}_1\ \mathbf{a}_2\ \cdots\ \mathbf{a}_n] is m×nm \times n and x∈Rn\mathbf{x} \in \mathbb{R}^n, then

Ax=[a1a2⋯an][x1⋮xn]=x1a1+x2a2+⋯+xnanA\mathbf{x} = \begin{bmatrix} \mathbf{a}_1 & \mathbf{a}_2 & \cdots & \mathbf{a}_n \end{bmatrix} \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix} = x_1\mathbf{a}_1 + x_2\mathbf{a}_2 + \cdots + x_n\mathbf{a}_n

In words: AxA\mathbf{x} is the linear combination of the columns of AA using the entries of x\mathbf{x} as weights.

AxA\mathbf{x} is defined only when the number of columns of AA equals the number of entries of x\mathbf{x}. A 3×23 \times 2 matrix times a vector in R3\mathbb{R}^3 is undefined. The result AxA\mathbf{x} has as many entries as AA has rows (mm).

Row–vector rule (the fast way to compute): if AxA\mathbf{x} is defined, then entry ii of AxA\mathbf{x} is the sum of products of entries of row ii of AA with the corresponding entries of x\mathbf{x}.

Mini-example: both methods

[234−15−3][x1x2x3]\begin{bmatrix} 2 & 3 & 4 \\ -1 & 5 & -3 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix}

The identity matrix InI_n (1s on the diagonal, 0s elsewhere) satisfies Inx=xI_n\mathbf{x} = \mathbf{x} for every x∈Rn\mathbf{x} \in \mathbb{R}^n.

Three Ways to Write the Same System

Theorem 3 (Lay §1.4): If AA is an m×nm \times n matrix with columns a1,…,an\mathbf{a}_1, \dots, \mathbf{a}_n, and b∈Rm\mathbf{b} \in \mathbb{R}^m, then the matrix equation Ax=bA\mathbf{x} = \mathbf{b} has the same solution set as the vector equation x1a1+x2a2+⋯+xnan=b,x_1\mathbf{a}_1 + x_2\mathbf{a}_2 + \cdots + x_n\mathbf{a}_n = \mathbf{b}, which in turn has the same solution set as the system of linear equations whose augmented matrix is [a1 a2 ⋯ an∣b][\mathbf{a}_1\ \mathbf{a}_2\ \cdots\ \mathbf{a}_n \mid \mathbf{b}].

For instance, the system  x1+2x2−x3=4,  −5x2+3x3=1 \ x_1 + 2x_2 - x_3 = 4,\ \ -5x_2 + 3x_3 = 1\ can be written as

x1[10]+x2[2−5]+x3[−13]=[41]or[12−10−53][x1x2x3]=[41].x_1\begin{bmatrix} 1 \\ 0 \end{bmatrix} + x_2\begin{bmatrix} 2 \\ -5 \end{bmatrix} + x_3\begin{bmatrix} -1 \\ 3 \end{bmatrix} = \begin{bmatrix} 4 \\ 1 \end{bmatrix} \quad\text{or}\quad \begin{bmatrix} 1 & 2 & -1 \\ 0 & -5 & 3 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 4 \\ 1 \end{bmatrix}.

Translation recipe: the coefficients of xjx_j (read down the system) form column aj\mathbf{a}_j; the right-hand sides form b\mathbf{b}. A missing variable has coefficient 00.

Consequence: Ax=bA\mathbf{x} = \mathbf{b} has a solution iff b\mathbf{b} is a linear combination of the columns of AA, i.e. iff b∈Span⁡{a1,…,an}\mathbf{b} \in \operatorname{Span}\{\mathbf{a}_1, \dots, \mathbf{a}_n\}.

When Is Ax=bA\mathbf{x} = \mathbf{b} Solvable for Every b\mathbf{b}?

Theorem 4 (Lay §1.4): Let AA be an m×nm \times n matrix. The following statements are logically equivalent (for a particular AA, they are either all true or all false):

  • (a) For each b\mathbf{b} in Rm\mathbb{R}^m, the equation Ax=bA\mathbf{x} = \mathbf{b} has a solution.
  • (b) Each b\mathbf{b} in Rm\mathbb{R}^m is a linear combination of the columns of AA.
  • (c) The columns of AA span Rm\mathbb{R}^m.
  • (d) AA has a pivot position in every row.

Why (d) is the test: if some row of the echelon form UU of AA is all zeros, then you can pick a right-hand side that puts a nonzero number in that row of [U∣d][U \mid \mathbf{d}], giving [ 0 ⋯ 0∣d ][\,0\ \cdots\ 0 \mid d\,] with d≠0d \ne 0: inconsistent. If every row has a pivot, the last column can never contain a pivot, so every system is consistent.

Common mistake: Theorem 4(d) is about the coefficient matrix AA, not the augmented matrix [A∣b][A \mid \mathbf{b}]. A pivot in every row of [A∣b][A \mid \mathbf{b}] could mean the pivot is in the b\mathbf{b} column, which means inconsistent!

Quick counting test: a pivot needs its own row and its own column. If AA has fewer columns than rows (n<mn \lt m), it has at most nn pivots, so it cannot have a pivot in all mm rows. E.g. 3 vectors can never span R4\mathbb{R}^4.

Properties of the Product AxA\mathbf{x}

Theorem 5 (Lay §1.4): If AA is m×nm \times n, u,v∈Rn\mathbf{u}, \mathbf{v} \in \mathbb{R}^n and cc is a scalar, then

  • (a) A(u+v)=Au+AvA(\mathbf{u} + \mathbf{v}) = A\mathbf{u} + A\mathbf{v}
  • (b) A(cu)=c(Au)A(c\mathbf{u}) = c(A\mathbf{u})

Why: by the definition, A(u+v)=(u1+v1)a1+⋯+(un+vn)an=(u1a1+⋯+unan)+(v1a1+⋯+vnan)A(\mathbf{u} + \mathbf{v}) = (u_1 + v_1)\mathbf{a}_1 + \cdots + (u_n + v_n)\mathbf{a}_n = (u_1\mathbf{a}_1 + \cdots + u_n\mathbf{a}_n) + (v_1\mathbf{a}_1 + \cdots + v_n\mathbf{a}_n). Similarly for cuc\mathbf{u}. These two rules say x↦Ax\mathbf{x} \mapsto A\mathbf{x} is linear, which is the starting point for linear transformations in §1.8.


Solved Examples (Textbook Questions)

Exercise 1

(Adapted from Lay §1.4, Exercises 1–4)

Compute the products using (i) the definition of AxA\mathbf{x} and (ii) the row–vector rule. If a product is undefined, explain why.

(a) [−421601][3−27]\begin{bmatrix} -4 & 2 \\ 1 & 6 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 3 \\ -2 \\ 7 \end{bmatrix} \qquad (b) [26−1][5−1]\begin{bmatrix} 2 \\ 6 \\ -1 \end{bmatrix}\begin{bmatrix} 5 \\ -1 \end{bmatrix}

(c) [65−4−376][2−3]\begin{bmatrix} 6 & 5 \\ -4 & -3 \\ 7 & 6 \end{bmatrix}\begin{bmatrix} 2 \\ -3 \end{bmatrix} \qquad (d) [83−4512][111]\begin{bmatrix} 8 & 3 & -4 \\ 5 & 1 & 2 \end{bmatrix}\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}

Show solution ↓
Solution

First check sizes: #columns of AA must equal #entries of x\mathbf{x}.

(a) Undefined. AA is 3×23 \times 2 (2 columns) but x\mathbf{x} has 3 entries. There is no way to use 3 weights on 2 columns.

(b) Undefined. AA is 3×13 \times 1 (1 column) but x\mathbf{x} has 2 entries.

(c) 3×23 \times 2 times R2\mathbb{R}^2: defined, result in R3\mathbb{R}^3.

(i) Definition (weights 22 and −3-3 on the columns):

2[6−47]−3[5−36]=[12−814]+[−159−18]=[−31−4]2\begin{bmatrix} 6 \\ -4 \\ 7 \end{bmatrix} - 3\begin{bmatrix} 5 \\ -3 \\ 6 \end{bmatrix} = \begin{bmatrix} 12 \\ -8 \\ 14 \end{bmatrix} + \begin{bmatrix} -15 \\ 9 \\ -18 \end{bmatrix} = \begin{bmatrix} -3 \\ 1 \\ -4 \end{bmatrix}

(ii) Row–vector rule:

[6(2)+5(−3)(−4)(2)+(−3)(−3)7(2)+6(−3)]=[12−15−8+914−18]=[−31−4]\begin{bmatrix} 6(2) + 5(-3) \\ (-4)(2) + (-3)(-3) \\ 7(2) + 6(-3) \end{bmatrix} = \begin{bmatrix} 12 - 15 \\ -8 + 9 \\ 14 - 18 \end{bmatrix} = \begin{bmatrix} -3 \\ 1 \\ -4 \end{bmatrix}

(d) 2×32 \times 3 times R3\mathbb{R}^3: defined, result in R2\mathbb{R}^2.

(i) Definition:  1[85]+1[31]+1[−42]=[8+3−45+1+2]=[78]\ 1\begin{bmatrix} 8 \\ 5 \end{bmatrix} + 1\begin{bmatrix} 3 \\ 1 \end{bmatrix} + 1\begin{bmatrix} -4 \\ 2 \end{bmatrix} = \begin{bmatrix} 8 + 3 - 4 \\ 5 + 1 + 2 \end{bmatrix} = \begin{bmatrix} 7 \\ 8 \end{bmatrix}

(ii) Row–vector rule:  [8(1)+3(1)+(−4)(1)5(1)+1(1)+2(1)]=[78]\ \begin{bmatrix} 8(1) + 3(1) + (-4)(1) \\ 5(1) + 1(1) + 2(1) \end{bmatrix} = \begin{bmatrix} 7 \\ 8 \end{bmatrix}

(Multiplying by the all-ones vector just adds up the columns, i.e. gives the row sums.)

Exercise 2

(Adapted from Lay §1.4, Exercises 5–8)

Use the definition of AxA\mathbf{x} to write the matrix equation as a vector equation, or vice versa.

(a) [51−84−2−73−5][5−13−2]=[−816]\begin{bmatrix} 5 & 1 & -8 & 4 \\ -2 & -7 & 3 & -5 \end{bmatrix}\begin{bmatrix} 5 \\ -1 \\ 3 \\ -2 \end{bmatrix} = \begin{bmatrix} -8 \\ 16 \end{bmatrix} \qquad (b) [7−3219−6−32][−2−5]=[1−912−4]\begin{bmatrix} 7 & -3 \\ 2 & 1 \\ 9 & -6 \\ -3 & 2 \end{bmatrix}\begin{bmatrix} -2 \\ -5 \end{bmatrix} = \begin{bmatrix} 1 \\ -9 \\ 12 \\ -4 \end{bmatrix}

(c) x1[4−17−4]+x2[−53−51]+x3[7−802]=[6−80−7]x_1\begin{bmatrix} 4 \\ -1 \\ 7 \\ -4 \end{bmatrix} + x_2\begin{bmatrix} -5 \\ 3 \\ -5 \\ 1 \end{bmatrix} + x_3\begin{bmatrix} 7 \\ -8 \\ 0 \\ 2 \end{bmatrix} = \begin{bmatrix} 6 \\ -8 \\ 0 \\ -7 \end{bmatrix}

(d) z1[4−2]+z2[−45]+z3[−54]+z4[30]=[413]z_1\begin{bmatrix} 4 \\ -2 \end{bmatrix} + z_2\begin{bmatrix} -4 \\ 5 \end{bmatrix} + z_3\begin{bmatrix} -5 \\ 4 \end{bmatrix} + z_4\begin{bmatrix} 3 \\ 0 \end{bmatrix} = \begin{bmatrix} 4 \\ 13 \end{bmatrix}

Show solution ↓
Solution

Matrix → vector equation: use the entries of x\mathbf{x} as weights on the columns of AA.

(a)

5[5−2]−1[1−7]+3[−83]−2[4−5]=[−816]5\begin{bmatrix} 5 \\ -2 \end{bmatrix} - 1\begin{bmatrix} 1 \\ -7 \end{bmatrix} + 3\begin{bmatrix} -8 \\ 3 \end{bmatrix} - 2\begin{bmatrix} 4 \\ -5 \end{bmatrix} = \begin{bmatrix} -8 \\ 16 \end{bmatrix}

(Check: top 25−1−24−8=−825 - 1 - 24 - 8 = -8, bottom −10+7+9+10=16-10 + 7 + 9 + 10 = 16 ✓.)

(b)

−2[729−3]−5[−31−62]=[1−912−4]-2\begin{bmatrix} 7 \\ 2 \\ 9 \\ -3 \end{bmatrix} - 5\begin{bmatrix} -3 \\ 1 \\ -6 \\ 2 \end{bmatrix} = \begin{bmatrix} 1 \\ -9 \\ 12 \\ -4 \end{bmatrix}

(Check: −14+15=1-14 + 15 = 1, −4−5=−9-4 - 5 = -9, −18+30=12-18 + 30 = 12, 6−10=−46 - 10 = -4 ✓.)

Vector → matrix equation: the vectors become the columns of AA; the weights become the unknown vector.

(c) Three vectors in R4\mathbb{R}^4, so AA is 4×34 \times 3 and x∈R3\mathbf{x} \in \mathbb{R}^3:

[4−57−13−87−50−412][x1x2x3]=[6−80−7]\begin{bmatrix} 4 & -5 & 7 \\ -1 & 3 & -8 \\ 7 & -5 & 0 \\ -4 & 1 & 2 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 6 \\ -8 \\ 0 \\ -7 \end{bmatrix}

(For your information, the unique solution is x=(5,7,3)\mathbf{x} = (5, 7, 3); check row 1: 20−35+21=620 - 35 + 21 = 6 ✓.)

(d) Four vectors in R2\mathbb{R}^2, so AA is 2×42 \times 4 and the unknown is z∈R4\mathbf{z} \in \mathbb{R}^4:

[4−4−53−2540][z1z2z3z4]=[413]\begin{bmatrix} 4 & -4 & -5 & 3 \\ -2 & 5 & 4 & 0 \end{bmatrix}\begin{bmatrix} z_1 \\ z_2 \\ z_3 \\ z_4 \end{bmatrix} = \begin{bmatrix} 4 \\ 13 \end{bmatrix}

(For your information, one solution is (7,3,3,1)(7, 3, 3, 1); the general solution is z1=6+0.75z3−1.25z4z_1 = 6 + 0.75z_3 - 1.25z_4, z2=5−0.5z3−0.5z4z_2 = 5 - 0.5z_3 - 0.5z_4 with z3,z4z_3, z_4 free.)

Writing a vector equation as Ax=bA\mathbf{x} = \mathbf{b} is a skill used throughout the course. Always say what AA and x\mathbf{x} are.

Exercise 3

(Adapted from Lay §1.4, Exercises 9 and 10)

Write the system first as a vector equation and then as a matrix equation.

(a) 3x1+x2−5x3=9x2+4x3=0\quad \begin{aligned} 3x_1 + x_2 - 5x_3 &= 9 \\ x_2 + 4x_3 &= 0 \end{aligned} \qquad (b) 8x1−x2=45x1+4x2=1x1−3x2=2\quad \begin{aligned} 8x_1 - x_2 &= 4 \\ 5x_1 + 4x_2 &= 1 \\ x_1 - 3x_2 &= 2 \end{aligned}

Show solution ↓
Solution

By Theorem 3 all three forms have the same solution set.

(a) x1x_1 does not appear in equation 2, so its coefficient there is 00:

x1[30]+x2[11]+x3[−54]=[90]and[31−5014][x1x2x3]=[90]x_1\begin{bmatrix} 3 \\ 0 \end{bmatrix} + x_2\begin{bmatrix} 1 \\ 1 \end{bmatrix} + x_3\begin{bmatrix} -5 \\ 4 \end{bmatrix} = \begin{bmatrix} 9 \\ 0 \end{bmatrix} \qquad\text{and}\qquad \begin{bmatrix} 3 & 1 & -5 \\ 0 & 1 & 4 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 9 \\ 0 \end{bmatrix}

(b)

x1[851]+x2[−14−3]=[412]and[8−1541−3][x1x2]=[412]x_1\begin{bmatrix} 8 \\ 5 \\ 1 \end{bmatrix} + x_2\begin{bmatrix} -1 \\ 4 \\ -3 \end{bmatrix} = \begin{bmatrix} 4 \\ 1 \\ 2 \end{bmatrix} \qquad\text{and}\qquad \begin{bmatrix} 8 & -1 \\ 5 & 4 \\ 1 & -3 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = \begin{bmatrix} 4 \\ 1 \\ 2 \end{bmatrix}
Exercise 4

(Adapted from Lay §1.4, Exercises 11 and 12)

Given AA and b\mathbf{b}, write the augmented matrix for the linear system that corresponds to Ax=bA\mathbf{x} = \mathbf{b}. Then solve the system and write the solution as a vector.

(a)  A=[124015−2−4−3], b=[−229]\ A = \begin{bmatrix} 1 & 2 & 4 \\ 0 & 1 & 5 \\ -2 & -4 & -3 \end{bmatrix},\ \mathbf{b} = \begin{bmatrix} -2 \\ 2 \\ 9 \end{bmatrix} \qquad (b)  A=[121−3−12053], b=[01−1]\ A = \begin{bmatrix} 1 & 2 & 1 \\ -3 & -1 & 2 \\ 0 & 5 & 3 \end{bmatrix},\ \mathbf{b} = \begin{bmatrix} 0 \\ 1 \\ -1 \end{bmatrix}

Show solution ↓
Solution

The augmented matrix is [a1 a2 a3∣b][\mathbf{a}_1\ \mathbf{a}_2\ \mathbf{a}_3 \mid \mathbf{b}]. Reduce all the way to RREF to read off the solution.

(a) R3←R3+2R1R_3 \leftarrow R_3 + 2R_1, then R3←15R3R_3 \leftarrow \tfrac{1}{5}R_3:

[124−20152−2−4−39]∼[124−201520055]∼[124−201520011]\left[\begin{array}{ccc|c} 1 & 2 & 4 & -2 \\ 0 & 1 & 5 & 2 \\ -2 & -4 & -3 & 9 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 2 & 4 & -2 \\ 0 & 1 & 5 & 2 \\ 0 & 0 & 5 & 5 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 2 & 4 & -2 \\ 0 & 1 & 5 & 2 \\ 0 & 0 & 1 & 1 \end{array}\right]

Clear above the pivot in column 3 (R2←R2−5R3R_2 \leftarrow R_2 - 5R_3, R1←R1−4R3R_1 \leftarrow R_1 - 4R_3), then above column 2 (R1←R1−2R2R_1 \leftarrow R_1 - 2R_2):

∼[120−6010−30011]∼[1000010−30011]\sim \left[\begin{array}{ccc|c} 1 & 2 & 0 & -6 \\ 0 & 1 & 0 & -3 \\ 0 & 0 & 1 & 1 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & -3 \\ 0 & 0 & 1 & 1 \end{array}\right]x=[x1x2x3]=[0−31]\mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 0 \\ -3 \\ 1 \end{bmatrix}

Check: Ax=0 a1−3a2+a3=(0−6+4, 0−3+5, 0+12−3)=(−2,2,9)A\mathbf{x} = 0\,\mathbf{a}_1 - 3\mathbf{a}_2 + \mathbf{a}_3 = (0 - 6 + 4,\ 0 - 3 + 5,\ 0 + 12 - 3) = (-2, 2, 9) ✓.

(b) R2←R2+3R1R_2 \leftarrow R_2 + 3R_1, then R3←R3−R2R_3 \leftarrow R_3 - R_2:

[1210−3−121053−1]∼[12100551053−1]∼[1210055100−2−2]\left[\begin{array}{ccc|c} 1 & 2 & 1 & 0 \\ -3 & -1 & 2 & 1 \\ 0 & 5 & 3 & -1 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 2 & 1 & 0 \\ 0 & 5 & 5 & 1 \\ 0 & 5 & 3 & -1 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 2 & 1 & 0 \\ 0 & 5 & 5 & 1 \\ 0 & 0 & -2 & -2 \end{array}\right]

R3←−12R3R_3 \leftarrow -\tfrac{1}{2}R_3 gives x3=1x_3 = 1. Then R2←R2−5R3R_2 \leftarrow R_2 - 5R_3, R1←R1−R3R_1 \leftarrow R_1 - R_3:

∼[120−1050−40011]∼[120−1010−4/50011]∼[1003/5010−4/50011]\sim \left[\begin{array}{ccc|c} 1 & 2 & 0 & -1 \\ 0 & 5 & 0 & -4 \\ 0 & 0 & 1 & 1 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 2 & 0 & -1 \\ 0 & 1 & 0 & -4/5 \\ 0 & 0 & 1 & 1 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 0 & 0 & 3/5 \\ 0 & 1 & 0 & -4/5 \\ 0 & 0 & 1 & 1 \end{array}\right]

(using R2←15R2R_2 \leftarrow \tfrac{1}{5}R_2, then R1←R1−2R2R_1 \leftarrow R_1 - 2R_2: −1+85=35-1 + \tfrac{8}{5} = \tfrac{3}{5}).

x=[3/5−4/51]\mathbf{x} = \begin{bmatrix} 3/5 \\ -4/5 \\ 1 \end{bmatrix}

Check row 2: −3⋅35−(−45)+2(1)=−95+45+2=1-3\cdot\tfrac{3}{5} - \left(-\tfrac{4}{5}\right) + 2(1) = -\tfrac{9}{5} + \tfrac{4}{5} + 2 = 1 ✓.

Exercise 5

(Adapted from Lay §1.4, Exercise 14)

Let u=[2−32]\mathbf{u} = \begin{bmatrix} 2 \\ -3 \\ 2 \end{bmatrix} and A=[58701−1130]A = \begin{bmatrix} 5 & 8 & 7 \\ 0 & 1 & -1 \\ 1 & 3 & 0 \end{bmatrix}. Is u\mathbf{u} in the subset of R3\mathbb{R}^3 spanned by the columns of AA? Why or why not?

Show solution ↓
Solution

u∈Span⁡{a1,a2,a3}\mathbf{u} \in \operatorname{Span}\{\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3\} iff Ax=uA\mathbf{x} = \mathbf{u} is consistent. Row reduce [A∣u][A \mid \mathbf{u}].

Swap R1↔R3R_1 \leftrightarrow R_3 (to get a convenient 11 as the first pivot), then R3←R3−5R1R_3 \leftarrow R_3 - 5R_1:

[587201−1−31302]∼[130201−1−35872]∼[130201−1−30−77−8]\left[\begin{array}{ccc|c} 5 & 8 & 7 & 2 \\ 0 & 1 & -1 & -3 \\ 1 & 3 & 0 & 2 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 3 & 0 & 2 \\ 0 & 1 & -1 & -3 \\ 5 & 8 & 7 & 2 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 3 & 0 & 2 \\ 0 & 1 & -1 & -3 \\ 0 & -7 & 7 & -8 \end{array}\right]

R3←R3+7R2R_3 \leftarrow R_3 + 7R_2: the third row becomes (0, 0, 7−7, −8−21)=(0,0,0,−29)(0,\ 0,\ 7 - 7,\ -8 - 21) = (0, 0, 0, -29):

∼[130201−1−3000−29]\sim \left[\begin{array}{ccc|c} 1 & 3 & 0 & 2 \\ 0 & 1 & -1 & -3 \\ 0 & 0 & 0 & -29 \end{array}\right]

The last row says 0=−290 = -29, so Ax=uA\mathbf{x} = \mathbf{u} has no solution. Therefore u\mathbf{u} is not in the subset spanned by the columns of AA.

Since AA has only 2 pivots (no pivot in row 3), Theorem 4 already tells us the columns of AA do not span R3\mathbb{R}^3: they span only a plane. This u\mathbf{u} happens to lie off that plane.

Exercise 6

(Adapted from Lay §1.4, Exercise 15)

Let A=[2−1−63]A = \begin{bmatrix} 2 & -1 \\ -6 & 3 \end{bmatrix} and b=[b1b2]\mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}. Show that the equation Ax=bA\mathbf{x} = \mathbf{b} does not have a solution for all possible b\mathbf{b}, and describe the set of all b\mathbf{b} for which Ax=bA\mathbf{x} = \mathbf{b} does have a solution.

Show solution ↓
Solution

Row reduce the augmented matrix with a general right-hand side, carrying b1,b2b_1, b_2 along. R2←R2+3R1R_2 \leftarrow R_2 + 3R_1:

[2−1b1−63b2]∼[2−1b100b2+3b1]\left[\begin{array}{cc|c} 2 & -1 & b_1 \\ -6 & 3 & b_2 \end{array}\right] \sim \left[\begin{array}{cc|c} 2 & -1 & b_1 \\ 0 & 0 & b_2 + 3b_1 \end{array}\right]

Row 2 reads 0=b2+3b10 = b_2 + 3b_1.

  • If 3b1+b2≠03b_1 + b_2 \ne 0 the system is inconsistent. For example b=[10]\mathbf{b} = \begin{bmatrix} 1 \\ 0 \end{bmatrix} gives 0=30 = 3. So Ax=bA\mathbf{x} = \mathbf{b} is not solvable for all b\mathbf{b}. (Equivalently, by Theorem 4: AA has no pivot in row 2, so its columns do not span R2\mathbb{R}^2.)
  • Ax=bA\mathbf{x} = \mathbf{b} is consistent exactly when b2+3b1=0b_2 + 3b_1 = 0, i.e. b2=−3b1b_2 = -3b_1.

Set of good b\mathbf{b}: {[b1−3b1]:b1∈R}=Span⁡{[1−3]}\left\{ \begin{bmatrix} b_1 \\ -3b_1 \end{bmatrix} : b_1 \in \mathbb{R} \right\} = \operatorname{Span}\left\{ \begin{bmatrix} 1 \\ -3 \end{bmatrix} \right\}, a line through the origin in R2\mathbb{R}^2. This makes sense: column 2 of AA is −12-\tfrac{1}{2} times column 1, so the columns only span the line through (2,−6)(2, -6), which is the same line.

Exercise 7

(Adapted from Lay §1.4, Exercise 27)

Let q1,q2,q3\mathbf{q}_1, \mathbf{q}_2, \mathbf{q}_3 and v\mathbf{v} represent vectors in R5\mathbb{R}^5, and let x1,x2,x3x_1, x_2, x_3 denote scalars. Write the following vector equation as a matrix equation. Identify any symbols you choose to use.

x1q1+x2q2+x3q3=vx_1\mathbf{q}_1 + x_2\mathbf{q}_2 + x_3\mathbf{q}_3 = \mathbf{v}
Show solution ↓
Solution

Put the vectors into the columns of a matrix and the weights into a vector:

Q=[q1q2q3] (a 5×3 matrix),x=[x1x2x3]∈R3.Q = \begin{bmatrix} \mathbf{q}_1 & \mathbf{q}_2 & \mathbf{q}_3 \end{bmatrix} \ (\text{a } 5 \times 3 \text{ matrix}), \qquad \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} \in \mathbb{R}^3.

By the definition of the matrix–vector product, Qx=x1q1+x2q2+x3q3Q\mathbf{x} = x_1\mathbf{q}_1 + x_2\mathbf{q}_2 + x_3\mathbf{q}_3, so the vector equation becomes

Qx=v.Q\mathbf{x} = \mathbf{v}.

If you write the answer as "Ax=bA\mathbf{x} = \mathbf{b}", you must say what AA and b\mathbf{b} are (A=[q1 q2 q3]A = [\mathbf{q}_1\ \mathbf{q}_2\ \mathbf{q}_3], b=v\mathbf{b} = \mathbf{v}). Unexplained symbols lose marks.