Theory: The Matrix Equation A x = b A\mathbf{x} = \mathbf{b} A x = b
The Product A x A\mathbf{x} A x (Lay §1.4)
Definition : If A = [ a 1 a 2 ⋯ a n ] A = [\mathbf{a}_1\ \mathbf{a}_2\ \cdots\ \mathbf{a}_n] A = [ a 1 a 2 ⋯ a n ] is m × n m \times n m × n and x ∈ R n \mathbf{x} \in \mathbb{R}^n x ∈ R n , then
A x = [ a 1 a 2 ⋯ a n ] [ x 1 ⋮ x n ] = x 1 a 1 + x 2 a 2 + ⋯ + x n a n A\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 A x = [ a 1 a 2 ⋯ a n ] x 1 ⋮ x n = x 1 a 1 + x 2 a 2 + ⋯ + x n a n
In words: A x A\mathbf{x} A x is the linear combination of the columns of A A A using the entries of x \mathbf{x} x as weights.
A x A\mathbf{x} A x is defined only when the number of columns of A A A equals the number of entries of x \mathbf{x} x . A 3 × 2 3 \times 2 3 × 2 matrix times a vector in R 3 \mathbb{R}^3 R 3 is undefined . The result A x A\mathbf{x} A x has as many entries as A A A has rows (m m m ).
Row–vector rule (the fast way to compute): if A x A\mathbf{x} A x is defined, then entry i i i of A x A\mathbf{x} A x is the sum of products of entries of row i i i of A A A with the corresponding entries of x \mathbf{x} x .
Mini-example: both methods
[ 2 3 4 − 1 5 − 3 ] [ x 1 x 2 x 3 ] \begin{bmatrix} 2 & 3 & 4 \\ -1 & 5 & -3 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} [ 2 − 1 3 5 4 − 3 ] x 1 x 2 x 3
Definition : x 1 [ 2 − 1 ] + x 2 [ 3 5 ] + x 3 [ 4 − 3 ] = [ 2 x 1 + 3 x 2 + 4 x 3 − x 1 + 5 x 2 − 3 x 3 ] x_1\begin{bmatrix} 2 \\ -1 \end{bmatrix} + x_2\begin{bmatrix} 3 \\ 5 \end{bmatrix} + x_3\begin{bmatrix} 4 \\ -3 \end{bmatrix} = \begin{bmatrix} 2x_1 + 3x_2 + 4x_3 \\ -x_1 + 5x_2 - 3x_3 \end{bmatrix} x 1 [ 2 − 1 ] + x 2 [ 3 5 ] + x 3 [ 4 − 3 ] = [ 2 x 1 + 3 x 2 + 4 x 3 − x 1 + 5 x 2 − 3 x 3 ]
Row–vector rule : row 1 ⋅ x = 2 x 1 + 3 x 2 + 4 x 3 \cdot\ \mathbf{x} = 2x_1 + 3x_2 + 4x_3 ⋅ x = 2 x 1 + 3 x 2 + 4 x 3 , row 2 ⋅ x = − x 1 + 5 x 2 − 3 x 3 \cdot\ \mathbf{x} = -x_1 + 5x_2 - 3x_3 ⋅ x = − x 1 + 5 x 2 − 3 x 3 . Same answer.
The identity matrix I n I_n I n (1s on the diagonal, 0s elsewhere) satisfies I n x = x I_n\mathbf{x} = \mathbf{x} I n x = x for every x ∈ R n \mathbf{x} \in \mathbb{R}^n x ∈ R n .
Three Ways to Write the Same System
Theorem 3 (Lay §1.4) : If A A A is an m × n m \times n m × n matrix with columns a 1 , … , a n \mathbf{a}_1, \dots, \mathbf{a}_n a 1 , … , a n , and b ∈ R m \mathbf{b} \in \mathbb{R}^m b ∈ R m , then the matrix equation
A x = b A\mathbf{x} = \mathbf{b} A x = b
has the same solution set as the vector equation
x 1 a 1 + x 2 a 2 + ⋯ + x n a n = b , x_1\mathbf{a}_1 + x_2\mathbf{a}_2 + \cdots + x_n\mathbf{a}_n = \mathbf{b}, x 1 a 1 + x 2 a 2 + ⋯ + x n a n = b ,
which in turn has the same solution set as the system of linear equations whose augmented matrix is [ a 1 a 2 ⋯ a n ∣ b ] [\mathbf{a}_1\ \mathbf{a}_2\ \cdots\ \mathbf{a}_n \mid \mathbf{b}] [ a 1 a 2 ⋯ a n ∣ b ] .
For instance, the system x 1 + 2 x 2 − x 3 = 4 , − 5 x 2 + 3 x 3 = 1 \ x_1 + 2x_2 - x_3 = 4,\ \ -5x_2 + 3x_3 = 1\ x 1 + 2 x 2 − x 3 = 4 , − 5 x 2 + 3 x 3 = 1 can be written as
x 1 [ 1 0 ] + x 2 [ 2 − 5 ] + x 3 [ − 1 3 ] = [ 4 1 ] or [ 1 2 − 1 0 − 5 3 ] [ x 1 x 2 x 3 ] = [ 4 1 ] . 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}. x 1 [ 1 0 ] + x 2 [ 2 − 5 ] + x 3 [ − 1 3 ] = [ 4 1 ] or [ 1 0 2 − 5 − 1 3 ] x 1 x 2 x 3 = [ 4 1 ] .
Translation recipe : the coefficients of x j x_j x j (read down the system) form column a j \mathbf{a}_j a j ; the right-hand sides form b \mathbf{b} b . A missing variable has coefficient 0 0 0 .
Consequence: A x = b A\mathbf{x} = \mathbf{b} A x = b has a solution iff b \mathbf{b} b is a linear combination of the columns of A A A , i.e. iff b ∈ Span { a 1 , … , a n } \mathbf{b} \in \operatorname{Span}\{\mathbf{a}_1, \dots, \mathbf{a}_n\} b ∈ Span { a 1 , … , a n } .
When Is A x = b A\mathbf{x} = \mathbf{b} A x = b Solvable for Every b \mathbf{b} b ?
Theorem 4 (Lay §1.4) : Let A A A be an m × n m \times n m × n matrix. The following statements are logically equivalent (for a particular A A A , they are either all true or all false):
(a) For each b \mathbf{b} b in R m \mathbb{R}^m R m , the equation A x = b A\mathbf{x} = \mathbf{b} A x = b has a solution.
(b) Each b \mathbf{b} b in R m \mathbb{R}^m R m is a linear combination of the columns of A A A .
(c) The columns of A A A span R m \mathbb{R}^m R m .
(d) A A A has a pivot position in every row .
Why (d) is the test : if some row of the echelon form U U U of A A A 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}] [ U ∣ d ] , giving [ 0 ⋯ 0 ∣ d ] [\,0\ \cdots\ 0 \mid d\,] [ 0 ⋯ 0 ∣ d ] with d ≠ 0 d \ne 0 d = 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 A A A , not the augmented matrix [ A ∣ b ] [A \mid \mathbf{b}] [ A ∣ b ] . A pivot in every row of [ A ∣ b ] [A \mid \mathbf{b}] [ A ∣ b ] could mean the pivot is in the b \mathbf{b} b column, which means inconsistent !
Quick counting test : a pivot needs its own row and its own column. If A A A has fewer columns than rows (n < m n \lt m n < m ), it has at most n n n pivots, so it cannot have a pivot in all m m m rows. E.g. 3 vectors can never span R 4 \mathbb{R}^4 R 4 .
Properties of the Product A x A\mathbf{x} A x
Theorem 5 (Lay §1.4) : If A A A is m × n m \times n m × n , u , v ∈ R n \mathbf{u}, \mathbf{v} \in \mathbb{R}^n u , v ∈ R n and c c c is a scalar, then
(a) A ( u + v ) = A u + A v A(\mathbf{u} + \mathbf{v}) = A\mathbf{u} + A\mathbf{v} A ( u + v ) = A u + A v
(b) A ( c u ) = c ( A u ) A(c\mathbf{u}) = c(A\mathbf{u}) A ( c u ) = c ( A u )
Why : by the definition, A ( u + v ) = ( u 1 + v 1 ) a 1 + ⋯ + ( u n + v n ) a n = ( u 1 a 1 + ⋯ + u n a n ) + ( v 1 a 1 + ⋯ + v n a n ) 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) A ( u + v ) = ( u 1 + v 1 ) a 1 + ⋯ + ( u n + v n ) a n = ( u 1 a 1 + ⋯ + u n a n ) + ( v 1 a 1 + ⋯ + v n a n ) . Similarly for c u c\mathbf{u} c u . These two rules say x ↦ A x \mathbf{x} \mapsto A\mathbf{x} x ↦ A 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 A x A\mathbf{x} A x and (ii) the row–vector rule. If a product is undefined, explain why.
(a) [ − 4 2 1 6 0 1 ] [ 3 − 2 7 ] \begin{bmatrix} -4 & 2 \\ 1 & 6 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 3 \\ -2 \\ 7 \end{bmatrix} − 4 1 0 2 6 1 3 − 2 7 \qquad (b) [ 2 6 − 1 ] [ 5 − 1 ] \begin{bmatrix} 2 \\ 6 \\ -1 \end{bmatrix}\begin{bmatrix} 5 \\ -1 \end{bmatrix} 2 6 − 1 [ 5 − 1 ]
(c) [ 6 5 − 4 − 3 7 6 ] [ 2 − 3 ] \begin{bmatrix} 6 & 5 \\ -4 & -3 \\ 7 & 6 \end{bmatrix}\begin{bmatrix} 2 \\ -3 \end{bmatrix} 6 − 4 7 5 − 3 6 [ 2 − 3 ] \qquad (d) [ 8 3 − 4 5 1 2 ] [ 1 1 1 ] \begin{bmatrix} 8 & 3 & -4 \\ 5 & 1 & 2 \end{bmatrix}\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} [ 8 5 3 1 − 4 2 ] 1 1 1
Show solution ↓ Hide solution ↑ Solution
First check sizes: #columns of A A A must equal #entries of x \mathbf{x} x .
(a) Undefined. A A A is 3 × 2 3 \times 2 3 × 2 (2 columns) but x \mathbf{x} x has 3 entries. There is no way to use 3 weights on 2 columns.
(b) Undefined. A A A is 3 × 1 3 \times 1 3 × 1 (1 column) but x \mathbf{x} x has 2 entries.
(c) 3 × 2 3 \times 2 3 × 2 times R 2 \mathbb{R}^2 R 2 : defined, result in R 3 \mathbb{R}^3 R 3 .
(i) Definition (weights 2 2 2 and − 3 -3 − 3 on the columns):
2 [ 6 − 4 7 ] − 3 [ 5 − 3 6 ] = [ 12 − 8 14 ] + [ − 15 9 − 18 ] = [ − 3 1 − 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} 2 6 − 4 7 − 3 5 − 3 6 = 12 − 8 14 + − 15 9 − 18 = − 3 1 − 4 (ii) Row–vector rule:
[ 6 ( 2 ) + 5 ( − 3 ) ( − 4 ) ( 2 ) + ( − 3 ) ( − 3 ) 7 ( 2 ) + 6 ( − 3 ) ] = [ 12 − 15 − 8 + 9 14 − 18 ] = [ − 3 1 − 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} 6 ( 2 ) + 5 ( − 3 ) ( − 4 ) ( 2 ) + ( − 3 ) ( − 3 ) 7 ( 2 ) + 6 ( − 3 ) = 12 − 15 − 8 + 9 14 − 18 = − 3 1 − 4 (d) 2 × 3 2 \times 3 2 × 3 times R 3 \mathbb{R}^3 R 3 : defined, result in R 2 \mathbb{R}^2 R 2 .
(i) Definition: 1 [ 8 5 ] + 1 [ 3 1 ] + 1 [ − 4 2 ] = [ 8 + 3 − 4 5 + 1 + 2 ] = [ 7 8 ] \ 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} 1 [ 8 5 ] + 1 [ 3 1 ] + 1 [ − 4 2 ] = [ 8 + 3 − 4 5 + 1 + 2 ] = [ 7 8 ]
(ii) Row–vector rule: [ 8 ( 1 ) + 3 ( 1 ) + ( − 4 ) ( 1 ) 5 ( 1 ) + 1 ( 1 ) + 2 ( 1 ) ] = [ 7 8 ] \ \begin{bmatrix} 8(1) + 3(1) + (-4)(1) \\ 5(1) + 1(1) + 2(1) \end{bmatrix} = \begin{bmatrix} 7 \\ 8 \end{bmatrix} [ 8 ( 1 ) + 3 ( 1 ) + ( − 4 ) ( 1 ) 5 ( 1 ) + 1 ( 1 ) + 2 ( 1 ) ] = [ 7 8 ]
(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 A x A\mathbf{x} A x to write the matrix equation as a vector equation, or vice versa.
(a) [ 5 1 − 8 4 − 2 − 7 3 − 5 ] [ 5 − 1 3 − 2 ] = [ − 8 16 ] \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} [ 5 − 2 1 − 7 − 8 3 4 − 5 ] 5 − 1 3 − 2 = [ − 8 16 ] \qquad (b) [ 7 − 3 2 1 9 − 6 − 3 2 ] [ − 2 − 5 ] = [ 1 − 9 12 − 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} 7 2 9 − 3 − 3 1 − 6 2 [ − 2 − 5 ] = 1 − 9 12 − 4
(c) x 1 [ 4 − 1 7 − 4 ] + x 2 [ − 5 3 − 5 1 ] + x 3 [ 7 − 8 0 2 ] = [ 6 − 8 0 − 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} x 1 4 − 1 7 − 4 + x 2 − 5 3 − 5 1 + x 3 7 − 8 0 2 = 6 − 8 0 − 7
(d) z 1 [ 4 − 2 ] + z 2 [ − 4 5 ] + z 3 [ − 5 4 ] + z 4 [ 3 0 ] = [ 4 13 ] 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} z 1 [ 4 − 2 ] + z 2 [ − 4 5 ] + z 3 [ − 5 4 ] + z 4 [ 3 0 ] = [ 4 13 ]
Show solution ↓ Hide solution ↑ Solution
Matrix → vector equation : use the entries of x \mathbf{x} x as weights on the columns of A A A .
(a)
5 [ 5 − 2 ] − 1 [ 1 − 7 ] + 3 [ − 8 3 ] − 2 [ 4 − 5 ] = [ − 8 16 ] 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} 5 [ 5 − 2 ] − 1 [ 1 − 7 ] + 3 [ − 8 3 ] − 2 [ 4 − 5 ] = [ − 8 16 ] (Check: top 25 − 1 − 24 − 8 = − 8 25 - 1 - 24 - 8 = -8 25 − 1 − 24 − 8 = − 8 , bottom − 10 + 7 + 9 + 10 = 16 -10 + 7 + 9 + 10 = 16 − 10 + 7 + 9 + 10 = 16 ✓.)
(b)
− 2 [ 7 2 9 − 3 ] − 5 [ − 3 1 − 6 2 ] = [ 1 − 9 12 − 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} − 2 7 2 9 − 3 − 5 − 3 1 − 6 2 = 1 − 9 12 − 4 (Check: − 14 + 15 = 1 -14 + 15 = 1 − 14 + 15 = 1 , − 4 − 5 = − 9 -4 - 5 = -9 − 4 − 5 = − 9 , − 18 + 30 = 12 -18 + 30 = 12 − 18 + 30 = 12 , 6 − 10 = − 4 6 - 10 = -4 6 − 10 = − 4 ✓.)
Vector → matrix equation : the vectors become the columns of A A A ; the weights become the unknown vector.
(c) Three vectors in R 4 \mathbb{R}^4 R 4 , so A A A is 4 × 3 4 \times 3 4 × 3 and x ∈ R 3 \mathbf{x} \in \mathbb{R}^3 x ∈ R 3 :
[ 4 − 5 7 − 1 3 − 8 7 − 5 0 − 4 1 2 ] [ x 1 x 2 x 3 ] = [ 6 − 8 0 − 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} 4 − 1 7 − 4 − 5 3 − 5 1 7 − 8 0 2 x 1 x 2 x 3 = 6 − 8 0 − 7 (For your information, the unique solution is x = ( 5 , 7 , 3 ) \mathbf{x} = (5, 7, 3) x = ( 5 , 7 , 3 ) ; check row 1: 20 − 35 + 21 = 6 20 - 35 + 21 = 6 20 − 35 + 21 = 6 ✓.)
(d) Four vectors in R 2 \mathbb{R}^2 R 2 , so A A A is 2 × 4 2 \times 4 2 × 4 and the unknown is z ∈ R 4 \mathbf{z} \in \mathbb{R}^4 z ∈ R 4 :
[ 4 − 4 − 5 3 − 2 5 4 0 ] [ z 1 z 2 z 3 z 4 ] = [ 4 13 ] \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} [ 4 − 2 − 4 5 − 5 4 3 0 ] z 1 z 2 z 3 z 4 = [ 4 13 ] (For your information, one solution is ( 7 , 3 , 3 , 1 ) (7, 3, 3, 1) ( 7 , 3 , 3 , 1 ) ; the general solution is z 1 = 6 + 0.75 z 3 − 1.25 z 4 z_1 = 6 + 0.75z_3 - 1.25z_4 z 1 = 6 + 0.75 z 3 − 1.25 z 4 , z 2 = 5 − 0.5 z 3 − 0.5 z 4 z_2 = 5 - 0.5z_3 - 0.5z_4 z 2 = 5 − 0.5 z 3 − 0.5 z 4 with z 3 , z 4 z_3, z_4 z 3 , z 4 free.)
Writing a vector equation as A x = b A\mathbf{x} = \mathbf{b} A x = b is a skill used throughout the course. Always say what A A A and x \mathbf{x} 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) 3 x 1 + x 2 − 5 x 3 = 9 x 2 + 4 x 3 = 0 \quad \begin{aligned} 3x_1 + x_2 - 5x_3 &= 9 \\ x_2 + 4x_3 &= 0 \end{aligned} 3 x 1 + x 2 − 5 x 3 x 2 + 4 x 3 = 9 = 0 \qquad (b) 8 x 1 − x 2 = 4 5 x 1 + 4 x 2 = 1 x 1 − 3 x 2 = 2 \quad \begin{aligned} 8x_1 - x_2 &= 4 \\ 5x_1 + 4x_2 &= 1 \\ x_1 - 3x_2 &= 2 \end{aligned} 8 x 1 − x 2 5 x 1 + 4 x 2 x 1 − 3 x 2 = 4 = 1 = 2
Show solution ↓ Hide solution ↑ Solution
By Theorem 3 all three forms have the same solution set.
(a) x 1 x_1 x 1 does not appear in equation 2, so its coefficient there is 0 0 0 :
x 1 [ 3 0 ] + x 2 [ 1 1 ] + x 3 [ − 5 4 ] = [ 9 0 ] and [ 3 1 − 5 0 1 4 ] [ x 1 x 2 x 3 ] = [ 9 0 ] 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} x 1 [ 3 0 ] + x 2 [ 1 1 ] + x 3 [ − 5 4 ] = [ 9 0 ] and [ 3 0 1 1 − 5 4 ] x 1 x 2 x 3 = [ 9 0 ] (b)
x 1 [ 8 5 1 ] + x 2 [ − 1 4 − 3 ] = [ 4 1 2 ] and [ 8 − 1 5 4 1 − 3 ] [ x 1 x 2 ] = [ 4 1 2 ] 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} x 1 8 5 1 + x 2 − 1 4 − 3 = 4 1 2 and 8 5 1 − 1 4 − 3 [ x 1 x 2 ] = 4 1 2
Exercise 4
(Adapted from Lay §1.4, Exercises 11 and 12)
Given A A A and b \mathbf{b} b , write the augmented matrix for the linear system that corresponds to A x = b A\mathbf{x} = \mathbf{b} A x = b . Then solve the system and write the solution as a vector.
(a) A = [ 1 2 4 0 1 5 − 2 − 4 − 3 ] , b = [ − 2 2 9 ] \ A = \begin{bmatrix} 1 & 2 & 4 \\ 0 & 1 & 5 \\ -2 & -4 & -3 \end{bmatrix},\ \mathbf{b} = \begin{bmatrix} -2 \\ 2 \\ 9 \end{bmatrix} A = 1 0 − 2 2 1 − 4 4 5 − 3 , b = − 2 2 9 \qquad (b) A = [ 1 2 1 − 3 − 1 2 0 5 3 ] , b = [ 0 1 − 1 ] \ A = \begin{bmatrix} 1 & 2 & 1 \\ -3 & -1 & 2 \\ 0 & 5 & 3 \end{bmatrix},\ \mathbf{b} = \begin{bmatrix} 0 \\ 1 \\ -1 \end{bmatrix} A = 1 − 3 0 2 − 1 5 1 2 3 , b = 0 1 − 1
Show solution ↓ Hide solution ↑ Solution
The augmented matrix is [ a 1 a 2 a 3 ∣ b ] [\mathbf{a}_1\ \mathbf{a}_2\ \mathbf{a}_3 \mid \mathbf{b}] [ a 1 a 2 a 3 ∣ b ] . Reduce all the way to RREF to read off the solution.
(a) R 3 ← R 3 + 2 R 1 R_3 \leftarrow R_3 + 2R_1 R 3 ← R 3 + 2 R 1 , then R 3 ← 1 5 R 3 R_3 \leftarrow \tfrac{1}{5}R_3 R 3 ← 5 1 R 3 :
[ 1 2 4 − 2 0 1 5 2 − 2 − 4 − 3 9 ] ∼ [ 1 2 4 − 2 0 1 5 2 0 0 5 5 ] ∼ [ 1 2 4 − 2 0 1 5 2 0 0 1 1 ] \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] 1 0 − 2 2 1 − 4 4 5 − 3 − 2 2 9 ∼ 1 0 0 2 1 0 4 5 5 − 2 2 5 ∼ 1 0 0 2 1 0 4 5 1 − 2 2 1 Clear above the pivot in column 3 (R 2 ← R 2 − 5 R 3 R_2 \leftarrow R_2 - 5R_3 R 2 ← R 2 − 5 R 3 , R 1 ← R 1 − 4 R 3 R_1 \leftarrow R_1 - 4R_3 R 1 ← R 1 − 4 R 3 ), then above column 2 (R 1 ← R 1 − 2 R 2 R_1 \leftarrow R_1 - 2R_2 R 1 ← R 1 − 2 R 2 ):
∼ [ 1 2 0 − 6 0 1 0 − 3 0 0 1 1 ] ∼ [ 1 0 0 0 0 1 0 − 3 0 0 1 1 ] \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] ∼ 1 0 0 2 1 0 0 0 1 − 6 − 3 1 ∼ 1 0 0 0 1 0 0 0 1 0 − 3 1 x = [ x 1 x 2 x 3 ] = [ 0 − 3 1 ] \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 0 \\ -3 \\ 1 \end{bmatrix} x = x 1 x 2 x 3 = 0 − 3 1 Check : A x = 0 a 1 − 3 a 2 + a 3 = ( 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) A x = 0 a 1 − 3 a 2 + a 3 = ( 0 − 6 + 4 , 0 − 3 + 5 , 0 + 12 − 3 ) = ( − 2 , 2 , 9 ) ✓.
(b) R 2 ← R 2 + 3 R 1 R_2 \leftarrow R_2 + 3R_1 R 2 ← R 2 + 3 R 1 , then R 3 ← R 3 − R 2 R_3 \leftarrow R_3 - R_2 R 3 ← R 3 − R 2 :
[ 1 2 1 0 − 3 − 1 2 1 0 5 3 − 1 ] ∼ [ 1 2 1 0 0 5 5 1 0 5 3 − 1 ] ∼ [ 1 2 1 0 0 5 5 1 0 0 − 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] 1 − 3 0 2 − 1 5 1 2 3 0 1 − 1 ∼ 1 0 0 2 5 5 1 5 3 0 1 − 1 ∼ 1 0 0 2 5 0 1 5 − 2 0 1 − 2 R 3 ← − 1 2 R 3 R_3 \leftarrow -\tfrac{1}{2}R_3 R 3 ← − 2 1 R 3 gives x 3 = 1 x_3 = 1 x 3 = 1 . Then R 2 ← R 2 − 5 R 3 R_2 \leftarrow R_2 - 5R_3 R 2 ← R 2 − 5 R 3 , R 1 ← R 1 − R 3 R_1 \leftarrow R_1 - R_3 R 1 ← R 1 − R 3 :
∼ [ 1 2 0 − 1 0 5 0 − 4 0 0 1 1 ] ∼ [ 1 2 0 − 1 0 1 0 − 4 / 5 0 0 1 1 ] ∼ [ 1 0 0 3 / 5 0 1 0 − 4 / 5 0 0 1 1 ] \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] ∼ 1 0 0 2 5 0 0 0 1 − 1 − 4 1 ∼ 1 0 0 2 1 0 0 0 1 − 1 − 4/5 1 ∼ 1 0 0 0 1 0 0 0 1 3/5 − 4/5 1 (using R 2 ← 1 5 R 2 R_2 \leftarrow \tfrac{1}{5}R_2 R 2 ← 5 1 R 2 , then R 1 ← R 1 − 2 R 2 R_1 \leftarrow R_1 - 2R_2 R 1 ← R 1 − 2 R 2 : − 1 + 8 5 = 3 5 -1 + \tfrac{8}{5} = \tfrac{3}{5} − 1 + 5 8 = 5 3 ).
x = [ 3 / 5 − 4 / 5 1 ] \mathbf{x} = \begin{bmatrix} 3/5 \\ -4/5 \\ 1 \end{bmatrix} x = 3/5 − 4/5 1 Check row 2 : − 3 ⋅ 3 5 − ( − 4 5 ) + 2 ( 1 ) = − 9 5 + 4 5 + 2 = 1 -3\cdot\tfrac{3}{5} - \left(-\tfrac{4}{5}\right) + 2(1) = -\tfrac{9}{5} + \tfrac{4}{5} + 2 = 1 − 3 ⋅ 5 3 − ( − 5 4 ) + 2 ( 1 ) = − 5 9 + 5 4 + 2 = 1 ✓.
Exercise 5
(Adapted from Lay §1.4, Exercise 14)
Let u = [ 2 − 3 2 ] \mathbf{u} = \begin{bmatrix} 2 \\ -3 \\ 2 \end{bmatrix} u = 2 − 3 2 and A = [ 5 8 7 0 1 − 1 1 3 0 ] A = \begin{bmatrix} 5 & 8 & 7 \\ 0 & 1 & -1 \\ 1 & 3 & 0 \end{bmatrix} A = 5 0 1 8 1 3 7 − 1 0 . Is u \mathbf{u} u in the subset of R 3 \mathbb{R}^3 R 3 spanned by the columns of A A A ? Why or why not?
Show solution ↓ Hide solution ↑ Solution
u ∈ Span { a 1 , a 2 , a 3 } \mathbf{u} \in \operatorname{Span}\{\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3\} u ∈ Span { a 1 , a 2 , a 3 } iff A x = u A\mathbf{x} = \mathbf{u} A x = u is consistent. Row reduce [ A ∣ u ] [A \mid \mathbf{u}] [ A ∣ u ] .
Swap R 1 ↔ R 3 R_1 \leftrightarrow R_3 R 1 ↔ R 3 (to get a convenient 1 1 1 as the first pivot), then R 3 ← R 3 − 5 R 1 R_3 \leftarrow R_3 - 5R_1 R 3 ← R 3 − 5 R 1 :
[ 5 8 7 2 0 1 − 1 − 3 1 3 0 2 ] ∼ [ 1 3 0 2 0 1 − 1 − 3 5 8 7 2 ] ∼ [ 1 3 0 2 0 1 − 1 − 3 0 − 7 7 − 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] 5 0 1 8 1 3 7 − 1 0 2 − 3 2 ∼ 1 0 5 3 1 8 0 − 1 7 2 − 3 2 ∼ 1 0 0 3 1 − 7 0 − 1 7 2 − 3 − 8 R 3 ← R 3 + 7 R 2 R_3 \leftarrow R_3 + 7R_2 R 3 ← R 3 + 7 R 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) ( 0 , 0 , 7 − 7 , − 8 − 21 ) = ( 0 , 0 , 0 , − 29 ) :
∼ [ 1 3 0 2 0 1 − 1 − 3 0 0 0 − 29 ] \sim \left[\begin{array}{ccc|c} 1 & 3 & 0 & 2 \\ 0 & 1 & -1 & -3 \\ 0 & 0 & 0 & -29 \end{array}\right] ∼ 1 0 0 3 1 0 0 − 1 0 2 − 3 − 29 The last row says 0 = − 29 0 = -29 0 = − 29 , so A x = u A\mathbf{x} = \mathbf{u} A x = u has no solution . Therefore u \mathbf{u} u is not in the subset spanned by the columns of A A A .
Since A A A has only 2 pivots (no pivot in row 3), Theorem 4 already tells us the columns of A A A do not span R 3 \mathbb{R}^3 R 3 : they span only a plane. This u \mathbf{u} u happens to lie off that plane.
Exercise 6
(Adapted from Lay §1.4, Exercise 15)
Let A = [ 2 − 1 − 6 3 ] A = \begin{bmatrix} 2 & -1 \\ -6 & 3 \end{bmatrix} A = [ 2 − 6 − 1 3 ] and b = [ b 1 b 2 ] \mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix} b = [ b 1 b 2 ] . Show that the equation A x = b A\mathbf{x} = \mathbf{b} A x = b does not have a solution for all possible b \mathbf{b} b , and describe the set of all b \mathbf{b} b for which A x = b A\mathbf{x} = \mathbf{b} A x = b does have a solution.
Show solution ↓ Hide solution ↑ Solution
Row reduce the augmented matrix with a general right-hand side, carrying b 1 , b 2 b_1, b_2 b 1 , b 2 along. R 2 ← R 2 + 3 R 1 R_2 \leftarrow R_2 + 3R_1 R 2 ← R 2 + 3 R 1 :
[ 2 − 1 b 1 − 6 3 b 2 ] ∼ [ 2 − 1 b 1 0 0 b 2 + 3 b 1 ] \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] [ 2 − 6 − 1 3 b 1 b 2 ] ∼ [ 2 0 − 1 0 b 1 b 2 + 3 b 1 ] Row 2 reads 0 = b 2 + 3 b 1 0 = b_2 + 3b_1 0 = b 2 + 3 b 1 .
If 3 b 1 + b 2 ≠ 0 3b_1 + b_2 \ne 0 3 b 1 + b 2 = 0 the system is inconsistent . For example b = [ 1 0 ] \mathbf{b} = \begin{bmatrix} 1 \\ 0 \end{bmatrix} b = [ 1 0 ] gives 0 = 3 0 = 3 0 = 3 . So A x = b A\mathbf{x} = \mathbf{b} A x = b is not solvable for all b \mathbf{b} b . (Equivalently, by Theorem 4: A A A has no pivot in row 2, so its columns do not span R 2 \mathbb{R}^2 R 2 .)
A x = b A\mathbf{x} = \mathbf{b} A x = b is consistent exactly when b 2 + 3 b 1 = 0 b_2 + 3b_1 = 0 b 2 + 3 b 1 = 0 , i.e. b 2 = − 3 b 1 b_2 = -3b_1 b 2 = − 3 b 1 .
Set of good b \mathbf{b} b : { [ b 1 − 3 b 1 ] : b 1 ∈ 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\} { [ b 1 − 3 b 1 ] : b 1 ∈ R } = Span { [ 1 − 3 ] } , a line through the origin in R 2 \mathbb{R}^2 R 2 . This makes sense: column 2 of A A A is − 1 2 -\tfrac{1}{2} − 2 1 times column 1, so the columns only span the line through ( 2 , − 6 ) (2, -6) ( 2 , − 6 ) , which is the same line.
Exercise 7
(Adapted from Lay §1.4, Exercise 27)
Let q 1 , q 2 , q 3 \mathbf{q}_1, \mathbf{q}_2, \mathbf{q}_3 q 1 , q 2 , q 3 and v \mathbf{v} v represent vectors in R 5 \mathbb{R}^5 R 5 , and let x 1 , x 2 , x 3 x_1, x_2, x_3 x 1 , x 2 , x 3 denote scalars. Write the following vector equation as a matrix equation. Identify any symbols you choose to use.
x 1 q 1 + x 2 q 2 + x 3 q 3 = v x_1\mathbf{q}_1 + x_2\mathbf{q}_2 + x_3\mathbf{q}_3 = \mathbf{v} x 1 q 1 + x 2 q 2 + x 3 q 3 = v Show solution ↓ Hide solution ↑ Solution
Put the vectors into the columns of a matrix and the weights into a vector:
Q = [ q 1 q 2 q 3 ] ( a 5 × 3 matrix ) , x = [ x 1 x 2 x 3 ] ∈ R 3 . 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. Q = [ q 1 q 2 q 3 ] ( a 5 × 3 matrix ) , x = x 1 x 2 x 3 ∈ R 3 . By the definition of the matrix–vector product, Q x = x 1 q 1 + x 2 q 2 + x 3 q 3 Q\mathbf{x} = x_1\mathbf{q}_1 + x_2\mathbf{q}_2 + x_3\mathbf{q}_3 Q x = x 1 q 1 + x 2 q 2 + x 3 q 3 , so the vector equation becomes
Q x = v . Q\mathbf{x} = \mathbf{v}. Q x = v .
If you write the answer as "A x = b A\mathbf{x} = \mathbf{b} A x = b ", you must say what A A A and b \mathbf{b} b are (A = [ q 1 q 2 q 3 ] A = [\mathbf{q}_1\ \mathbf{q}_2\ \mathbf{q}_3] A = [ q 1 q 2 q 3 ] , b = v \mathbf{b} = \mathbf{v} b = v ). Unexplained symbols lose marks.