The Class The Class
4 quizzes (open more than 24 hours) open on Thursday
Exams are timed (65-70 minute test)
Final Exam (not cumulative) on August 19th
1.1 Introduction to Linear Systems 1.1 Introduction to Linear Systems
Background
R \mathbb{R} R = All real numbers ( − ∞ , ∞ ) (-\infty, \infty) ( − ∞ , ∞ )
R 2 \mathbb{R}^{2} R 2 = xy-plane
R n \mathbb{R}^{n} R n = Vector space. All ( x 1 , x 2 , … , x n ) (x_1, x_2, …, x_n) ( x 1 , x 2 , … , x n )
Single variable Functions :
Linear: f ( x ) = 5 x , f ( x ) = a x f(x) = 5x,\ f(x) = ax f ( x ) = 5 x , f ( x ) = a x
Non-linear: f ( x ) = x 2 + cos ( x ) , f ( x ) = e x , f ( x ) = tan − 1 ( x ) f(x) = x^{2} + \cos (x),\ f(x) = e^{x},\ f(x) = \tan ^{-1}(x) f ( x ) = x 2 + cos ( x ) , f ( x ) = e x , f ( x ) = tan − 1 ( x )
Multi-variable Functions :
Linear: f ( x , y ) = a x + b y , f ( x , y , z ) = 5 x + 3 y + b z f(x,\ y) = ax + by,\ f(x,\ y,\ z) = 5x + 3y + bz f ( x , y ) = a x + b y , f ( x , y , z ) = 5 x + 3 y + b z
Non-linear:
Equations :
5 = 4 x 5 = 4x 5 = 4 x
A linear equation in the variables x 1 , x 2 , x 3 , … , x n x_1,\ x_2,\ x_3,\ …,\ x_n x 1 , x 2 , x 3 , … , x n is an equation of the form a 1 x 1 + a 2 x 2 + x 3 x 3 + … a n x n = b a_1x_1 + a_2x_2 + x_3x_3 + … a_nx_n = b a 1 x 1 + a 2 x 2 + x 3 x 3 + … a n x n = b where a 1 , a 2 , … , a n a_1,\ a_2,\ …,\ a_n a 1 , a 2 , … , a n are real numbers
A linear system (or system of linear equations ) is a collection of linear equations in same variables x 1 , x 2 , x 3 , … , x n x_1,\ x_2,\ x_3,\ …, x_n x 1 , x 2 , x 3 , … , x n .
Example
∣ x + 3 y = 1 x − y = 9 ∣ ⟹ L 2 = − 2 L 1 + L 2 ∣ x + 3 y = 1 0 − 7 y = 7 ∣ ⟹ L 2 = − 1 7 L 2 ∣ x + 3 y = 1 0 y = − 1 ∣ \begin{vmatrix} x & +3y & = 1 \\ x & -y & =9 \end{vmatrix} \overset{L_2 = -2 L_1 + L_2}{\implies} \begin{vmatrix} x & +3y & =1 \\ 0 & -7y & =7 \end{vmatrix} \overset{L_2 = -\frac{1}{7} L_2}{\implies} \begin{vmatrix} x & +3y & =1 \\ 0 & y & =-1 \end{vmatrix} ∣ ∣ x x + 3 y − y = 1 = 9 ∣ ∣ ⟹ L 2 = − 2 L 1 + L 2 ∣ ∣ x 0 + 3 y − 7 y = 1 = 7 ∣ ∣ ⟹ L 2 = − 7 1 L 2 ∣ ∣ x 0 + 3 y y = 1 = − 1 ∣ ∣
⟹ L 1 = − 3 L 2 + L 1 ∣ x = 4 y = − 1 ∣ \overset{L_1 = -3 L_2 + L_1}{\implies} \begin{vmatrix} x & = 4 \\ y & = -1 \end{vmatrix} ⟹ L 1 = − 3 L 2 + L 1 ∣ ∣ x y = 4 = − 1 ∣ ∣
Example
∣ x + 3 y = 2 − 2 x − 6 y = − 4 ∣ ⟹ L 2 = 2 L 1 + L 2 ∣ x + 3 y = 2 0 = 0 ∣ \begin{vmatrix} x & + 3y & =2 \\ -2x & -6y & =-4 \end{vmatrix} \overset{L_2 = 2L_1 + L_2}{\implies} \begin{vmatrix} x & +3y & = 2 \\ & 0 & = 0 \end{vmatrix} ∣ ∣ x − 2 x + 3 y − 6 y = 2 = − 4 ∣ ∣ ⟹ L 2 = 2 L 1 + L 2 ∣ ∣ x + 3 y 0 = 2 = 0 ∣ ∣
Solutions form the line x + 3 y = 2 x+3y=2 x + 3 y = 2 . Infinitely many solutions.
Example
Example:
∣ x + y = 0 2 x − y + 3 z = 3 x − 2 y − z = 3 ∣ ⟹ L 3 = − L 1 + L 3 L 2 = − 2 L 1 + L 2 ∣ x + y = 0 − 3 y + 3 z = 3 − 3 y − z = 3 ∣ \begin{vmatrix} x & +y & & = 0 \\ 2x & -y & + 3z & = 3 \\ x & -2y & -z & =3 \end{vmatrix} \overset{\overset{L_2 = -2L_1 + L_2}{L_3 = -L_1 + L_3}}{\implies} \begin{vmatrix} x & +y & &=0 \\ & -3y & +3z & = 3 \\ & -3y & -z & =3 \end{vmatrix} ∣ ∣ x 2 x x + y − y − 2 y + 3 z − z = 0 = 3 = 3 ∣ ∣ ⟹ L 3 = − L 1 + L 3 L 2 = − 2 L 1 + L 2 ∣ ∣ x + y − 3 y − 3 y + 3 z − z = 0 = 3 = 3 ∣ ∣
⟹ L 2 = L 2 − 1 3 ∣ x + y = 0 y − z = − 1 z = 0 ∣ ⟹ L 3 = 3 L 2 + L 3 ∣ x + y = 0 y − z − 1 − 4 z = 0 ∣ \overset{L_2 = L_2 -\frac{1}{3}}{\implies} \begin{vmatrix} x & +y & & = 0 \\ & y & -z & =-1 \\ & & z & =0 \end{vmatrix} \overset{L_3 = 3L_2 + L_3}{\implies} \begin{vmatrix} x & +y & & =0 \\ & y & -z & -1 \\ & & -4z & = 0 \end{vmatrix} ⟹ L 2 = L 2 − 3 1 ∣ ∣ x + y y − z z = 0 = − 1 = 0 ∣ ∣ ⟹ L 3 = 3 L 2 + L 3 ∣ ∣ x + y y − z − 4 z = 0 − 1 = 0 ∣ ∣
⟹ L 3 = − 1 4 L 3 ∣ x + y = 0 y − z = − 1 z = 0 ∣ ⟹ L 2 = L 3 + L 2 ∣ x + y = 0 y = − 1 z = 0 ∣ \overset{L_3 = -\frac{1}{4} L_3}{\implies} \begin{vmatrix} x & +y & =0 \\ & y & -z & = -1 \\ & & z & =0 \end{vmatrix} \overset{L_2 = L_3 + L_2}{\implies} \begin{vmatrix} x & + y & & =0 \\ & y & & =-1 \\ & & z & =0 \end{vmatrix} ⟹ L 3 = − 4 1 L 3 ∣ ∣ x + y y = 0 − z z = − 1 = 0 ∣ ∣ ⟹ L 2 = L 3 + L 2 ∣ ∣ x + y y z = 0 = − 1 = 0 ∣ ∣
⟹ L 1 = L 1 − L 2 ∣ x = 1 y = − 1 z = 0 ∣ \overset{L_1 = L_1 - L_2}{\implies} \begin{vmatrix} x & =1 \\ y & =-1 \\ z &=0 \end{vmatrix} ⟹ L 1 = L 1 − L 2 ∣ ∣ x y z = 1 = − 1 = 0 ∣ ∣
Solution ( x , y , z ) = ( 1 , − 1 , 0 ) (x,\ y,\ z) = (1,\ -1,\ 0) ( x , y , z ) = ( 1 , − 1 , 0 )
Example
∣ x + y + z = 2 y + z = 1 x + 2 y 2 z = 3 ∣ ⟹ L 3 = − L 1 + L 3 ∣ x + y + z = 2 y + z = 1 y + z = 1 ∣ \begin{vmatrix} x & + y & + z & =2 \\ & y & +z & =1 \\ x & +2y & 2z & =3 \end{vmatrix} \overset{L_3 = -L_1 + L_3}{\implies} \begin{vmatrix} x & +y & +z & = 2 \\ & y & + z & =1 \\ & y & +z & =1 \end{vmatrix} ∣ ∣ x x + y y + 2 y + z + z 2 z = 2 = 1 = 3 ∣ ∣ ⟹ L 3 = − L 1 + L 3 ∣ ∣ x + y y y + z + z + z = 2 = 1 = 1 ∣ ∣
⟹ L 3 = − L 2 + l 3 ∣ x + y + z = 2 y + z = 1 0 = 0 ∣ ⟹ L 1 = − L 2 + L 1 ∣ x = 1 y + z = 1 0 = 0 ∣ \overset{L_3 = -L_2 + l_3}{\implies} \begin{vmatrix} x & +y & +z & =2 \\ & y & +z & =1 \\ & & 0 & =0 \end{vmatrix} \overset{L_1 = -L_2 + L_1}{\implies} \begin{vmatrix} x & & & =1\\ & y & +z & =1\\ & & 0 & =0 \end{vmatrix} ⟹ L 3 = − L 2 + l 3 ∣ ∣ x + y y + z + z 0 = 2 = 1 = 0 ∣ ∣ ⟹ L 1 = − L 2 + L 1 ∣ ∣ x y + z 0 = 1 = 1 = 0 ∣ ∣
This example has a free variable . Let z = t z=t z = t .
Solution: ( x , y , z ) = ( 1 , 1 − t , t ) (x,\ y,\ z) = (1,\ 1-t,\ t) ( x , y , z ) = ( 1 , 1 − t , t ) . Has infinitely many solutions.
y + z = 1 ⟹ y = 1 − t y + z = 1 \implies y = 1 -t y + z = 1 ⟹ y = 1 − t
Example
∣ x + y + z = 2 y + z = 1 2 y + 2 z = 0 ∣ ⟹ L 3 = − 2 L 2 + L 3 ∣ x + y + z = 2 y + z = 1 0 = − 2 ∣ \begin{vmatrix} x & + y & + z & =2 \\ & y & + z & =1 \\ & 2y & + 2z & =0 \end{vmatrix} \overset{L_3 = -2L_2 + L_3}{\implies} \begin{vmatrix} x & +y & +z & =2 \\ & y & + z & =1 \\ & & 0 & =-2 \end{vmatrix} ∣ ∣ x + y y 2 y + z + z + 2 z = 2 = 1 = 0 ∣ ∣ ⟹ L 3 = − 2 L 2 + L 3 ∣ ∣ x + y y + z + z 0 = 2 = 1 = − 2 ∣ ∣
No solutions.
How many solutions are possible to a system of linear equations?
Answer:
0 Solutions
1 Solution
Infinitely many solutions
(This is because planes cannot curve)
Geometric Interpretation
A linear equation a x + b y = c ax + by = c a x + b y = c defined a line in R 2 \mathbb{R}^{2} R 2
Solutions to a linear system are intersections of lines in R 2 \mathbb{R}^{2} R 2 .
0 Points (Solutions)
1 Point (Solution)
∞ \infty ∞ many points (Solutions) if they are the same line
A linear equation a x + b y + c z = d ax + by + cz = d a x + b y + cz = d defined a plane in R 3 \mathbb{R}^{3} R 3 .
Solutions to a linear system are intersections of (hyper) planes in R 3 \mathbb{R}^{3} R 3 .
0 Points (Solutions)
1 Point (Solution)
∞ \infty ∞ many points (Solutions): All the planes contain a line. Also if all planes could be the same plane.
Example
Find all polynomials f ( t ) f(t) f ( t ) of degree ≤ 2 \le 2 ≤ 2 .
Whose graph run through (1, 3) and (2, 6) and
Such that f ′ ( 1 ) = 1 f^{\prime}(1) = 1 f ′ ( 1 ) = 1
Use f ( t ) = a + b t + c t 2 f(t) = a + bt + ct^{2} f ( t ) = a + b t + c t 2
We know
f ( 1 ) = 3 ⟹ a + b + c = 3 f(1) = 3 \implies a + b + c = 3 f ( 1 ) = 3 ⟹ a + b + c = 3
f ( 2 ) = 6 ⟹ a + 2 b + 4 c = 6 f(2) = 6 \implies a + 2b + 4c = 6 f ( 2 ) = 6 ⟹ a + 2 b + 4 c = 6
f ’ ( t ) = b + 2 c t f’(t) = b + 2ct f ’ ( t ) = b + 2 c t
f ’ ( 1 ) = 1 ⟹ b + 2 c = 1 f’(1) = 1 \implies b + 2c = 1 f ’ ( 1 ) = 1 ⟹ b + 2 c = 1
∣ a + b + c = 3 a + 2 b + 4 c = 6 b + 2 c = 1 ∣ ⟹ L 2 = − L 1 + L 2 ∣ a + b + c = 3 b + 3 c = 3 b + 2 c = 1 ∣ \begin{vmatrix} a & +b & + c & =3 \\ a & +2b & +4c & =6 \\ & b & +2c & =1 \end{vmatrix} \overset{L_2 = -L_1 + L_2}{\implies} \begin{vmatrix} a & +b & +c & =3\\ & b & +3c & =3 \\ & b & +2c & =1 \end{vmatrix} ∣ ∣ a a + b + 2 b b + c + 4 c + 2 c = 3 = 6 = 1 ∣ ∣ ⟹ L 2 = − L 1 + L 2 ∣ ∣ a + b b b + c + 3 c + 2 c = 3 = 3 = 1 ∣ ∣
⟹ L 3 = − L 2 + L 3 ∣ a + b + c = 3 b + 3 c = 3 c = 2 ∣ ⟹ L 1 = − L 3 + L 1 L 2 = − 3 L 3 + L 2 ∣ a + b = 1 b − 3 c = 2 ∣ \overset{L_3 = -L_2 + L_3}{\implies} \begin{vmatrix} a & +b & +c & =3 \\ & b& +3c & =3 \\ & & c & =2 \end{vmatrix} \overset{\overset{L_2 = -3L_3 + L_2}{L_1 = -L_3 + L_1}}{\implies} \begin{vmatrix} a & +b & =1\\ & b & -3\\ & c & =2 \end{vmatrix} ⟹ L 3 = − L 2 + L 3 ∣ ∣ a + b b + c + 3 c c = 3 = 3 = 2 ∣ ∣ ⟹ L 1 = − L 3 + L 1 L 2 = − 3 L 3 + L 2 ∣ ∣ a + b b c = 1 − 3 = 2 ∣ ∣
⟹ L 1 = L 1 − L 2 ∣ a = 4 b = − 3 c = 2 ∣ \overset{L_1 = L_1 - L_2}{\implies} \begin{vmatrix} a & =4 \\ b & =-3 \\ c & =2 \end{vmatrix} ⟹ L 1 = L 1 − L 2 ∣ ∣ a b c = 4 = − 3 = 2 ∣ ∣
f ( t ) = 4 − 3 t + 2 t 2 f(t) = 4 - 3t + 2t^{2} f ( t ) = 4 − 3 t + 2 t 2
1.2 Matrices, Vectors, and Gauss-Jordan Elimination 1.2 Matrices, Vectors, and Gauss-Jordan Elimination
∣ x + 2 y + 3 z = 1 2 x + 4 y + 7 z = 2 3 x + 7 y + 4 z = 8 ∣ \begin{vmatrix} x & +2y & +3z & =1 \\ 2x & +4y & +7z & =2 \\ 3x & +7y & +4z & =8 \end{vmatrix} ∣ ∣ x 2 x 3 x + 2 y + 4 y + 7 y + 3 z + 7 z + 4 z = 1 = 2 = 8 ∣ ∣
We can store all information in this linear system in a matrix which is a rectangular array of numbers.
Augmented Matrix :
[ 1 2 3 ∣ 1 2 4 7 ∣ 2 3 7 11 ∣ 8 ] \begin{bmatrix} 1 & 2 & 3 & \bigm| & 1 \\ 2 & 4 & 7 & \bigm| & 2 \\ 3 & 7 & 11 & \bigm| & 8 \end{bmatrix} ⎣ ⎡ 1 2 3 2 4 7 3 7 11 ∣ ∣ ∣ ∣ ∣ ∣ 1 2 8 ⎦ ⎤
3 row and 4 column = 2x4 matrix
Coefficient Matrix :
[ 1 2 3 2 4 7 3 7 1 ] \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 7 \\ 3 & 7 & 1 \end{bmatrix} ⎣ ⎡ 1 2 3 2 4 7 3 7 1 ⎦ ⎤
3 x 3 matrix
Generally, we have
A = [ a i j ] = [ a 11 a 12 a 13 ⋯ a 1 m a 21 a 22 a 23 ⋯ a 2 m ⋮ ⋮ ⋮ ⋱ ⋮ a n 1 a n 2 a n 3 ⋯ a n m ] A = [a_{ij}] = \begin{bmatrix} a_{11} & a_{12} & a_{13} & \cdots & a_{1m} \\ a_{21} & a_{22} & a_{23} & \cdots & a_{2m} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ a_{n_1} & a_{n2} & a_{n3} & \cdots & a_{nm} \end{bmatrix} A = [ a ij ] = ⎣ ⎡ a 11 a 21 ⋮ a n 1 a 12 a 22 ⋮ a n 2 a 13 a 23 ⋮ a n 3 ⋯ ⋯ ⋱ ⋯ a 1 m a 2 m ⋮ a nm ⎦ ⎤
Here, A A A is n × m n\times m n × m (n rows and m columns).
For square n × n n \times n n × n matrices:
Diagonal : a i j a_{ij} a ij for i ≠ j i \neq j i = j
Lower triangular : a i j = 0 a_{ij} = 0 a ij = 0 for i < j i < j i < j
Upper triangular : a i j = 0 a_{ij} = 0 a ij = 0 for i > j i > j i > j
Identity matrix I n I_n I n : square n × n n\times n n × n diagonal (a i j = 0 a_{ij} = 0 a ij = 0 for i ≠ j i \neq j i = j ) and a i i = 1 a_{ii} = 1 a ii = 1 for 1 ≤ i = n 1 \le i = n 1 ≤ i = n
I 3 = [ 1 0 0 0 1 0 0 0 1 ] I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} I 3 = ⎣ ⎡ 1 0 0 0 1 0 0 0 1 ⎦ ⎤
0 Matrix : Any size; all entries are 0
[ 0 0 0 0 0 0 0 0 0 0 ] \begin{bmatrix} 0 & 0 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 0 \end{bmatrix} [ 0 0 0 0 0 0 0 0 0 0 ]
Above is a 2 × 5 2\times 5 2 × 5 0-Matrix
Columns of an n × m n \times m n × m matrix form vectors in R n \mathbb{R}^{n} R n .
Example:
[ 1 2 3 ∣ 1 2 4 7 ∣ 2 3 7 11 ∣ 8 ] \begin{bmatrix}
1 & 2 & 3 & \Bigm| & 1 \\
2 & 4 & 7 & \Bigm| & 2 \\
3 & 7 & 11 & \Bigm| & 8
\end{bmatrix} ⎣ ⎡ 1 2 3 2 4 7 3 7 11 ∣ ∣ ∣ ∣ ∣ ∣ 1 2 8 ⎦ ⎤
We can represent vectors as the columns:
[ 1 2 ] , [ 3 1 ] , [ 1 9 ] , in R 2 \begin{bmatrix}
1 \\
2
\end{bmatrix}
,
\begin{bmatrix}
3 \\
1
\end{bmatrix}
,
\begin{bmatrix}
1 \\
9
\end{bmatrix}
, \text{ in } \mathbb{R}^2 [ 1 2 ] , [ 3 1 ] , [ 1 9 ] , in R 2
This is the standard representation for a vector in R n \mathbb{R}^{n} R n . A vector as an arrow starting at origin and ending at corresponding point.
Consider the two vectors:
v ⃗ = [ 1 2 ] , w ⃗ = [ 3 1 ] in R 2 \vec{v} =
\begin{bmatrix}
1 \\
2
\end{bmatrix}
,
\vec{w} =
\begin{bmatrix}
3 \\
1
\end{bmatrix}
\text{ in } \mathbb{R}^2 v = [ 1 2 ] , w = [ 3 1 ] in R 2
We may use 3 elementary row operations
Multiply/divide a row by a nonzero constant
Add/subtract a multiple of one row to another
Interchange two rows
Solving the system of linear equations:
Example
[ 1 2 3 ∣ 1 2 4 7 ∣ 2 3 7 11 ∣ 8 ] ⟹ − 3 R 1 + R 3 − 2 R 1 + R 2 [ 1 2 3 ∣ 1 0 0 1 ∣ 0 0 1 2 ∣ 5 ] ⟹ R 2 ↔ R 3 [ 1 2 3 ∣ 1 0 1 2 ∣ 5 0 0 1 ∣ 0 ] \begin{bmatrix}
1 & 2 & 3 & \Bigm| & 1 \\
2 & 4 & 7 & \Bigm| & 2 \\
3 & 7 & 11 & \Bigm| & 8
\end{bmatrix}
\overset{\overset{-2R_1 + R2}{-3R_1 + R_3}}{\implies}
\begin{bmatrix}
1 & 2 & 3 & \Bigm| & 1 \\
0 & 0 & 1 & \Bigm| & 0 \\
0 & 1 & 2 & \Bigm| & 5 \\
\end{bmatrix}
\overset{R_2 \leftrightarrow R_3}{\implies}
\begin{bmatrix}
1 & 2 & 3 & \bigm| & 1 \\
0 & 1 & 2 & \bigm| & 5 \\
0 & 0 & 1 & \bigm| & 0
\end{bmatrix} ⎣ ⎡ 1 2 3 2 4 7 3 7 11 ∣ ∣ ∣ ∣ ∣ ∣ 1 2 8 ⎦ ⎤ ⟹ − 3 R 1 + R 3 − 2 R 1 + R 2 ⎣ ⎡ 1 0 0 2 0 1 3 1 2 ∣ ∣ ∣ ∣ ∣ ∣ 1 0 5 ⎦ ⎤ ⟹ R 2 ↔ R 3 ⎣ ⎡ 1 0 0 2 1 0 3 2 1 ∣ ∣ ∣ ∣ ∣ ∣ 1 5 0 ⎦ ⎤
⟹ − 2 R 3 + R 2 − 3 R 3 + R 1 [ 1 2 0 ∣ 1 0 1 0 ∣ 5 0 0 1 ∣ 0 ] ⟹ − 2 R 2 + R 1 [ 1 0 0 ∣ − 9 0 1 0 ∣ 5 0 0 1 ∣ 0 ] identity matrix \overset{\overset{-3R_3 + R_1}{-2R_3 + R_2}}{\implies}
\begin{bmatrix}
1 & 2 & 0 & \bigm| & 1 \\
0 & 1 & 0 & \bigm| & 5 \\
0 & 0 & 1 & \bigm| & 0
\end{bmatrix}
\overset{-2R_2 + R_1}{\implies}
\begin{bmatrix}
1 & 0 & 0 & \bigm| & -9 \\
0 & 1 & 0 & \bigm| & 5 \\
0 & 0 & 1 & \bigm| & 0
\end{bmatrix}
\text{ identity matrix} ⟹ − 2 R 3 + R 2 − 3 R 3 + R 1 ⎣ ⎡ 1 0 0 2 1 0 0 0 1 ∣ ∣ ∣ ∣ ∣ ∣ 1 5 0 ⎦ ⎤ ⟹ − 2 R 2 + R 1 ⎣ ⎡ 1 0 0 0 1 0 0 0 1 ∣ ∣ ∣ ∣ ∣ ∣ − 9 5 0 ⎦ ⎤ identity matrix
∴ [ x y z ] = [ − 9 5 0 ] \therefore
\begin{bmatrix}
x \\
y \\
z
\end{bmatrix}
=
\begin{bmatrix}
-9 \\
5 \\
0
\end{bmatrix} ∴ ⎣ ⎡ x y z ⎦ ⎤ = ⎣ ⎡ − 9 5 0 ⎦ ⎤
Example
[ 1 − 1 1 ∣ 0 1 0 − 2 ∣ 2 2 − 1 1 ∣ 4 0 2 − 5 ∣ 4 ] ⟹ − 2 R 1 + R 3 − R 1 + R 2 [ 1 − 1 1 ∣ 0 0 1 − 3 ∣ 2 0 1 − 1 ∣ 4 0 2 − 5 ∣ 4 ] \begin{bmatrix}
1 & -1 & 1 & \bigm| & 0 \\
1 & 0 & -2 & \bigm| & 2 \\
2 & -1 & 1 & \bigm| & 4 \\
0 & 2 & -5 & \bigm| & 4
\end{bmatrix}
\overset{\overset{-R_1 + R_2}{-2R_1 + R_3}}{\implies}
\begin{bmatrix}
1 & -1 & 1 & \bigm| & 0 \\
0 & 1 & -3 & \bigm| & 2 \\
0 & 1 & -1 & \bigm| & 4 \\
0 & 2 & -5 & \bigm| & 4
\end{bmatrix} ⎣ ⎡ 1 1 2 0 − 1 0 − 1 2 1 − 2 1 − 5 ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ 0 2 4 4 ⎦ ⎤ ⟹ − 2 R 1 + R 3 − R 1 + R 2 ⎣ ⎡ 1 0 0 0 − 1 1 1 2 1 − 3 − 1 − 5 ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ 0 2 4 4 ⎦ ⎤
⟹ − 2 R 2 + R 4 − R 2 + R 3 [ 1 − 1 1 ∣ 0 0 1 − 3 ∣ 2 0 0 2 ∣ 2 0 0 1 ∣ 0 ] ⟹ R 3 ↔ R 4 [ 1 − 1 1 ∣ 0 0 1 − 3 ∣ 2 0 0 1 ∣ 0 0 0 2 ∣ 2 ] \overset{\overset{-R_2 + R_3}{-2R_2 + R_4}}{\implies}
\begin{bmatrix}
1 & -1 & 1 & \bigm| & 0 \\
0 & 1 & -3 & \bigm| & 2 \\
0 & 0 & 2 & \bigm| & 2 \\
0 & 0 & 1 & \bigm| & 0 \\
\end{bmatrix}
\overset{R_3 \leftrightarrow R_4}{\implies}
\begin{bmatrix}
1 & -1 & 1 & \bigm| & 0 \\
0 & 1 & -3 & \bigm| & 2 \\
0 & 0 & 1 & \bigm| & 0 \\
0 & 0 & 2 & \bigm| & 2 \\
\end{bmatrix} ⟹ − 2 R 2 + R 4 − R 2 + R 3 ⎣ ⎡ 1 0 0 0 − 1 1 0 0 1 − 3 2 1 ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ 0 2 2 0 ⎦ ⎤ ⟹ R 3 ↔ R 4 ⎣ ⎡ 1 0 0 0 − 1 1 0 0 1 − 3 1 2 ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ 0 2 0 2 ⎦ ⎤
⟹ − 2 R 3 + R 4 [ 1 − 1 1 ∣ 0 0 1 − 3 ∣ 2 0 0 1 ∣ 0 0 0 0 ∣ 2 ] \overset{-2R_3 + R_4}{\implies}
\begin{bmatrix}
1 & -1 & 1 & \bigm| & 0 \\
0 & 1 & -3 & \bigm| & 2 \\
0 & 0 & 1 & \bigm| & 0 \\
0 & 0 & 0 & \bigm| & 2 \\
\end{bmatrix} ⟹ − 2 R 3 + R 4 ⎣ ⎡ 1 0 0 0 − 1 1 0 0 1 − 3 1 0 ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ 0 2 0 2 ⎦ ⎤
No solutions
Example
[ x 1 x 2 x 3 x 4 x 5 ⋯ ⋮ ⋮ ⋮ ⋮ ⋱ ] = [ 1 − 7 0 0 1 ∣ 3 0 0 1 0 − 2 ∣ 2 0 0 0 1 1 ∣ 1 ] \begin{bmatrix}
x_1 & x_2 & x_3 & x_4 & x_5 \cdots \\
\vdots & \vdots & \vdots & \vdots & \ddots
\end{bmatrix}
=
\begin{bmatrix}
1 & -7 & 0 & 0 & 1 & \bigm| & 3 \\
0 & 0 & 1 & 0 & -2 & \bigm| & 2 \\
0 & 0 & 0 & 1 & 1 & \bigm| & 1
\end{bmatrix} [ x 1 ⋮ x 2 ⋮ x 3 ⋮ x 4 ⋮ x 5 ⋯ ⋱ ] = ⎣ ⎡ 1 0 0 − 7 0 0 0 1 0 0 0 1 1 − 2 1 ∣ ∣ ∣ ∣ ∣ ∣ 3 2 1 ⎦ ⎤
This is already as far as we can go with row operations, but we have two free variables. They are x 2 x_2 x 2 and x 5 x_5 x 5 .
We can say that
x 2 = t x_2 = t x 2 = t
x 5 = s x_5 = s x 5 = s
x 1 = 3 + 7 t − s x_1 = 3 + 7t - s x 1 = 3 + 7 t − s
x 3 = 2 + 2 s x_3 = 2 + 2s x 3 = 2 + 2 s
x 4 = 1 − s x_4 = 1 - s x 4 = 1 − s
[ x 1 x 2 x 3 x 4 x 5 ] = [ 3 + 7 t − 5 t 2 + 2 s 1 − s s ] \begin{bmatrix}
x_1 \\
x_2 \\
x_3 \\
x_4 \\
x_5
\end{bmatrix}
=
\begin{bmatrix}
3 + 7t - 5 \\
t \\
2 + 2s \\
1 - s \\
s
\end{bmatrix} ⎣ ⎡ x 1 x 2 x 3 x 4 x 5 ⎦ ⎤ = ⎣ ⎡ 3 + 7 t − 5 t 2 + 2 s 1 − s s ⎦ ⎤
Example
[ 1 1 2 ∣ 0 2 − 1 1 ∣ 6 4 1 5 ∣ 6 ] ⟹ − 4 R 1 + R 3 − R 1 + R 2 [ 1 1 2 ∣ 0 0 − 3 − 3 ∣ 6 0 − 3 − 3 ∣ 6 ] \begin{bmatrix}
1 & 1 & 2 & \bigm| 0 \\
2 & -1 & 1 & \bigm| 6 \\
4 & 1 & 5 & \bigm| 6 \\
\end{bmatrix}
\overset{\overset{-R_1 + R_2}{-4R_1 + R_3}}{\implies}
\begin{bmatrix}
1 & 1 & 2 & \bigm| & 0 \\
0 & -3 & -3 & \bigm| & 6 \\
0 & -3 & -3 & \bigm| & 6
\end{bmatrix} ⎣ ⎡ 1 2 4 1 − 1 1 2 1 5 ∣ ∣ 0 ∣ ∣ 6 ∣ ∣ 6 ⎦ ⎤ ⟹ − 4 R 1 + R 3 − R 1 + R 2 ⎣ ⎡ 1 0 0 1 − 3 − 3 2 − 3 − 3 ∣ ∣ ∣ ∣ ∣ ∣ 0 6 6 ⎦ ⎤
⟹ ( − 1 3 ) R 2 [ 1 1 2 ∣ 0 0 1 1 ∣ − 2 0 − 3 − 3 ∣ 6 ] ⟹ 3 R 2 + R 3 [ 1 1 2 ∣ 0 0 1 1 ∣ − 2 0 0 0 ∣ 0 ] \overset{\left( -\frac{1}{3} \right) R_2}{\implies}
\begin{bmatrix}
1 & 1 & 2 & \bigm| & 0 \\
0 & 1 & 1 & \bigm| & -2 \\
0 & -3 & -3 & \bigm| & 6
\end{bmatrix}
\overset{3R_2 + R_3}{\implies}
\begin{bmatrix}
1 & 1 & 2 & \bigm| & 0 \\
0 & 1 & 1 & \bigm| & -2 \\
0 & 0 & 0 & \bigm| & 0
\end{bmatrix} ⟹ ( − 3 1 ) R 2 ⎣ ⎡ 1 0 0 1 1 − 3 2 1 − 3 ∣ ∣ ∣ ∣ ∣ ∣ 0 − 2 6 ⎦ ⎤ ⟹ 3 R 2 + R 3 ⎣ ⎡ 1 0 0 1 1 0 2 1 0 ∣ ∣ ∣ ∣ ∣ ∣ 0 − 2 0 ⎦ ⎤
⟹ − R 2 + R 1 [ 1 0 1 ∣ 2 0 1 1 ∣ − 2 0 0 0 ∣ 0 ] \overset{-R_2 + R_1}{\implies}
\begin{bmatrix}
1 & 0 & 1 & \bigm| & 2 \\
0 & 1 & 1 & \bigm| & -2 \\
0 & 0 & 0 & \bigm| & 0
\end{bmatrix} ⟹ − R 2 + R 1 ⎣ ⎡ 1 0 0 0 1 0 1 1 0 ∣ ∣ ∣ ∣ ∣ ∣ 2 − 2 0 ⎦ ⎤
z = t z=t z = t (free variable)
x = 2 − t x = 2-t x = 2 − t
y = − 3 − t y= -3 - t y = − 3 − t
[ x y z ] = [ 2 − t − 2 − t t ] \begin{bmatrix}
x \\
y \\
z
\end{bmatrix}
=
\begin{bmatrix}
2 -t\\
-2-t\\
t
\end{bmatrix} ⎣ ⎡ x y z ⎦ ⎤ = ⎣ ⎡ 2 − t − 2 − t t ⎦ ⎤
Defintion:
An n × m n\times m n × m matrix is in reduced row echelon form (rref) provided:
If a row has nonzero entries, the first nonzero entry is a 1, called leading 1 or pivot .
If a column contains a leading 1, then all other entries in column are zero.
If a row contains a leading 1,then each row above has a leading 1 and to the left.
Examples of matrices in reduced row echelon form:
[ 1 − 7 0 0 0 0 1 0 0 0 0 1 0 0 0 0 ] , [ 1 0 5 2 0 1 2 7 0 0 0 0 ] , [ 1 2 5 0 0 0 0 0 0 0 0 0 0 0 0 ] , [ 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 ] \begin{bmatrix}
1 & -7 & 0 & 0\\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0
\end{bmatrix}
,
\begin{bmatrix}
1 & 0 & 5 & 2\\
0 & 1 & 2 & 7 \\
0 & 0 & 0 & 0 \\
\end{bmatrix}
,
\begin{bmatrix}
1 & 2 & 5 \\
0 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0
\end{bmatrix}
,
\begin{bmatrix}
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 \\
\end{bmatrix} ⎣ ⎡ 1 0 0 0 − 7 0 0 0 0 1 0 0 0 0 1 0 ⎦ ⎤ , ⎣ ⎡ 1 0 0 0 1 0 5 2 0 2 7 0 ⎦ ⎤ , ⎣ ⎡ 1 0 0 0 0 2 0 0 0 0 5 0 0 0 0 ⎦ ⎤ , ⎣ ⎡ 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 ⎦ ⎤
Differences:
Leading entry (pivot position) in a row can be anything
No restriction on entries above a leading entry in a column
[ 5 − 7 2 8 0 0 1 0 0 0 0 − 1 0 0 0 0 ] , [ 2 7 5 2 0 6 2 7 0 0 0 0 ] , [ 5 3 5 0 0 0 0 0 0 0 0 0 0 0 0 ] , [ 0 0 7 7 0 0 0 6 0 0 0 0 0 0 0 0 ] \begin{bmatrix}
5 & -7 & 2 & 8\\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & -1 \\
0 & 0 & 0 & 0
\end{bmatrix}
,
\begin{bmatrix}
2 & 7 & 5 & 2\\
0 & 6 & 2 & 7 \\
0 & 0 & 0 & 0 \\
\end{bmatrix}
,
\begin{bmatrix}
5 & 3 & 5 \\
0 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0
\end{bmatrix}
,
\begin{bmatrix}
0 & 0 & 7 & 7 \\
0 & 0 & 0 & 6 \\
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 \\
\end{bmatrix} ⎣ ⎡ 5 0 0 0 − 7 0 0 0 2 1 0 0 8 0 − 1 0 ⎦ ⎤ , ⎣ ⎡ 2 0 0 7 6 0 5 2 0 2 7 0 ⎦ ⎤ , ⎣ ⎡ 5 0 0 0 0 3 0 0 0 0 5 0 0 0 0 ⎦ ⎤ , ⎣ ⎡ 0 0 0 0 0 0 0 0 7 0 0 0 7 6 0 0 ⎦ ⎤
Using the 3 elementary row operations, we may transform any matrix to one in rref (also ref). This method of solving a linear system is called Guass-Jordan Elimination .
1.3 On the Solutions of Linear Systems: Matrix Algebra 1.3 On the Solutions of Linear Systems: Matrix Algebra
Consider the augmented matrices:
ref with 1 unique solution: [ 2 0 0 ∣ − 3 0 3 0 ∣ 3 0 0 1 ∣ 14 ] \begin{bmatrix} 2 & 0 & 0 & \bigm| & -3 \\ 0 & 3 & 0 & \bigm| & 3 \\ 0 & 0 & 1 & \bigm| & 14\end{bmatrix} ⎣ ⎡ 2 0 0 0 3 0 0 0 1 ∣ ∣ ∣ ∣ ∣ ∣ − 3 3 14 ⎦ ⎤
rref with infinitely many solutions: [ 1 0 0 0 1 ∣ − 1 0 1 0 0 1 ∣ 0 0 0 1 1 0 ∣ 2 ] \begin{bmatrix} 1 & 0 & 0 & 0 & 1 & \bigm| & -1 \\ 0 & 1 & 0 & 0 & 1 & \bigm| & 0 \\ 0 & 0 & 1 & 1 & 0 & \bigm| & 2\end{bmatrix} ⎣ ⎡ 1 0 0 0 1 0 0 0 1 0 0 1 1 1 0 ∣ ∣ ∣ ∣ ∣ ∣ − 1 0 2 ⎦ ⎤
ref with 1 unique solution: [ 0 0 0 ∣ 4 0 1 2 ∣ 4 0 0 3 ∣ 6 0 0 0 ∣ 0 0 0 0 ∣ 0 ] \begin{bmatrix} 0 & 0 & 0 & \bigm| & 4 \\ 0 & 1 & 2 & \bigm| & 4 \\ 0 & 0 & 3 & \bigm| & 6 \\ 0 & 0 & 0 & \bigm| & 0 \\ 0 & 0 & 0 & \bigm| & 0 \\ \end{bmatrix} ⎣ ⎡ 0 0 0 0 0 0 1 0 0 0 0 2 3 0 0 ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ 4 4 6 0 0 ⎦ ⎤
ref with no solutions: [ 1 0 0 ∣ 3 0 1 0 ∣ − 1 0 0 2 ∣ 4 0 0 0 ∣ 10 ] \begin{bmatrix} 1 & 0 & 0 & \bigm| & 3 \\ 0 & 1 & 0 & \bigm| & -1 \\ 0 & 0 & 2 & \bigm| & 4 \\ 0 & 0 & 0 & \bigm| & 10 \\ \end{bmatrix} ⎣ ⎡ 1 0 0 0 0 1 0 0 0 0 2 0 ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ 3 − 1 4 10 ⎦ ⎤
A linear system is
consistent provided it has at least one solution
inconsistent provided it has no solutions
Theorem:
A linear system is inconsistent if and only if a row echelon form (ref) of its augmented matrix has a row [ 0 0 0 ⋯ 0 ∣ c ] \begin{bmatrix} 0 & 0 & 0 & \cdots & 0 & \bigm| & c \end{bmatrix} [ 0 0 0 ⋯ 0 ∣ ∣ c ] where c ≠ 0 c\neq 0 c = 0 .
A linear system is consistent then we have either:
A unique solution or
Infinitely many solutions (at least one free variable)
Rank
The rank of a matrix A A A , denoted rank(A)
is the number of leading 1’s in rref(A)
(the reduced row echelon form of A A A ).
Example
ref
[ 2 0 0 0 3 0 0 0 1 ] \begin{bmatrix}
2 & 0 & 0\\
0 & 3 & 0 \\
0 & 0 & 1
\end{bmatrix} ⎣ ⎡ 2 0 0 0 3 0 0 0 1 ⎦ ⎤
Has a rank of 3 (3x3)
Example
rref:
[ 1 0 0 0 1 0 1 0 0 1 1 0 1 1 0 ] \begin{bmatrix}
1 & 0 & 0 & 0 & 1 \\
0 & 1 & 0 & 0 & 1 \\
1 & 0 & 1 & 1 & 0 \\
\end{bmatrix} ⎣ ⎡ 1 0 1 0 1 0 0 0 1 0 0 1 1 1 0 ⎦ ⎤
Has a rank of 3 (3x5)
Example
ref:
[ 1 0 0 0 1 2 0 0 3 0 0 0 0 0 0 ] \begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 2 \\
0 & 0 & 3 \\
0 & 0 & 0 \\
0 & 0 & 0 \\
\end{bmatrix} ⎣ ⎡ 1 0 0 0 0 0 1 0 0 0 0 2 3 0 0 ⎦ ⎤
Rank of 3 (5x3)
Example
rref:
[ 1 0 0 0 0 0 0 0 0 ] \begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0 \\
\end{bmatrix} ⎣ ⎡ 1 0 0 0 0 0 0 0 0 ⎦ ⎤
Rank of 1 (3x3)
Example
rref:
[ 0 0 1 0 1 0 0 0 0 1 4 0 0 0 0 0 0 1 0 0 0 0 0 0 ] \begin{bmatrix}
0 & 0 & 1 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 & 4 & 0 \\
0 & 0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0 & 0 & 0 \\
\end{bmatrix} ⎣ ⎡ 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 4 0 0 0 0 1 0 ⎦ ⎤
rank of 3 (4x6 matrix)
Example
[ 3 3 3 3 3 3 ] ⟹ 1 3 R 1 [ 1 1 1 3 3 3 ] ⟹ − 3 R 1 + R 2 rref : [ 1 1 1 0 0 0 ] \begin{bmatrix}
3 & 3 & 3 \\
3 & 3 & 3
\end{bmatrix}
\overset{\frac{1}{3} R_1}{\implies}
\begin{bmatrix}
1 & 1 & 1 \\
3 & 3 & 3
\end{bmatrix}
\overset{-3R_1 + R_2}{\implies} \text{rref}:
\begin{bmatrix}
1 & 1 & 1 \\
0 & 0 & 0
\end{bmatrix} [ 3 3 3 3 3 3 ] ⟹ 3 1 R 1 [ 1 3 1 3 1 3 ] ⟹ − 3 R 1 + R 2 rref : [ 1 0 1 0 1 0 ]
This matrix has a rank of 1.
Example
[ 1 1 1 1 2 3 1 3 6 0 0 0 ] ⟹ − R 1 + R 3 R 2 − R 1 [ 1 1 1 0 1 2 0 2 5 0 0 0 ] ⟹ R 3 − 2 R 2 [ 1 1 1 0 1 2 0 0 1 0 0 0 ] \begin{bmatrix}
1 & 1 & 1 \\
1 & 2 & 3 \\
1 & 3 & 6 \\
0 & 0 & 0
\end{bmatrix}
\overset{\overset{R_2 - R_1}{-R_1 + R_3}}{\implies}
\begin{bmatrix}
1 & 1 & 1 \\
0 & 1 & 2 \\
0 & 2 & 5 \\
0 & 0 & 0
\end{bmatrix}
\overset{R_3 - 2R_2}{\implies}
\begin{bmatrix}
1 & 1 & 1 \\
0 & 1 & 2 \\
0 & 0 & 1 \\
0 & 0 & 0
\end{bmatrix} ⎣ ⎡ 1 1 1 0 1 2 3 0 1 3 6 0 ⎦ ⎤ ⟹ − R 1 + R 3 R 2 − R 1 ⎣ ⎡ 1 0 0 0 1 1 2 0 1 2 5 0 ⎦ ⎤ ⟹ R 3 − 2 R 2 ⎣ ⎡ 1 0 0 0 1 1 0 0 1 2 1 0 ⎦ ⎤
The rank of this matrix is 3.
Example
C = [ 0 1 a − 1 0 b − a − b 0 ] ⟹ R 1 ↔ R 2 [ − 1 0 b 0 1 a − a − b 0 ] ⟹ − 1 × R 1 [ 1 0 − b 0 1 a − a − b 0 ] C =
\begin{bmatrix}
0 & 1 & a \\
-1 & 0 & b \\
-a & -b & 0
\end{bmatrix}
\overset{R_1 \leftrightarrow R_2}{\implies}
\begin{bmatrix}
-1 & 0 & b \\
0 & 1 & a \\
-a & -b & 0
\end{bmatrix}
\overset{-1 \times R_1}{\implies}
\begin{bmatrix}
1 & 0 & -b \\
0 & 1 & a \\
-a & -b & 0
\end{bmatrix} C = ⎣ ⎡ 0 − 1 − a 1 0 − b a b 0 ⎦ ⎤ ⟹ R 1 ↔ R 2 ⎣ ⎡ − 1 0 − a 0 1 − b b a 0 ⎦ ⎤ ⟹ − 1 × R 1 ⎣ ⎡ 1 0 − a 0 1 − b − b a 0 ⎦ ⎤
⟹ a R 1 + R 3 [ 1 0 − b 0 1 a 0 − b − a b ] ⟹ b R 2 + R 3 [ 1 0 − b 0 1 a 0 0 0 ] \overset{aR_1 + R_3}{\implies}
\begin{bmatrix}
1 & 0 & -b \\
0 & 1 & a \\
0 & -b & -ab
\end{bmatrix}
\overset{bR_2 + R_3}{\implies}
\begin{bmatrix}
1 & 0 & -b \\
0 & 1 & a \\
0 & 0 & 0
\end{bmatrix} ⟹ a R 1 + R 3 ⎣ ⎡ 1 0 0 0 1 − b − b a − ab ⎦ ⎤ ⟹ b R 2 + R 3 ⎣ ⎡ 1 0 0 0 1 0 − b a 0 ⎦ ⎤
Rank is 2.
Suppose we have an n × m n \times m n × m coefficeint matrix
A = [ a 11 a 12 ⋯ a 1 m a 21 a 22 ⋯ a 2 m ⋮ ⋮ ⋱ ⋮ a n 1 a n 2 ⋯ a n m ] A =
\begin{bmatrix}
a_{11} & a_{12} & \cdots & a_{1m} \\
a_{21} & a_{22} & \cdots & a_{2m} \\
\vdots & \vdots & \ddots & \vdots \\
a_{n1} & a_{n2} & \cdots & a_{nm}
\end{bmatrix} A = ⎣ ⎡ a 11 a 21 ⋮ a n 1 a 12 a 22 ⋮ a n 2 ⋯ ⋯ ⋱ ⋯ a 1 m a 2 m ⋮ a nm ⎦ ⎤
rank ( A ) ≤ n \text{rank}(A) \le n rank ( A ) ≤ n
rank ( A ) ≤ m \text{rank}(A) \le m rank ( A ) ≤ m
Number of free variables = m − rank ( A ) m - \text{rank}(A) m − rank ( A )
If a linear system with coefficient matrix A A A has:
exactly one solution, then we have no free variables. Therefore the rank ( A ) = m \text{rank}(A) = m rank ( A ) = m .
no solutions, then ret augmented matrix [ 0 0 0 ∣ b ] \begin{bmatrix} 0 & 0 & 0 & \big| & b \end{bmatrix} [ 0 0 0 ∣ ∣ b ] where b ≠ 0 b\neq 0 b = 0 . Therefore rank(A) < n \text{rank(A)} < n rank(A) < n .
infinitely many solutions, then at least one free variable rank(A) < m \text{rank(A)} < m rank(A) < m .
Square Matricies : When a linear system has an n × n n \times n n × n coefficient matrix A A A , there is exactly one soltuion…
if and only if rank ( A ) = n \text{rank}(A) = n rank ( A ) = n
if and only if rref ( A ) = I n \text{rref}(A) = I_n rref ( A ) = I n (the n × n n \times n n × n identity)
Matrix Algebra
Suppose A = [ a i j ] A = [a_{ij}] A = [ a ij ] and B = [ b i j ] B = [b_{ij}] B = [ b ij ] are both n × m n \times m n × m and c c c is in R \mathbb{R} R .
Matrix Sum : A + B = [ a i j + b i j ] A+B = [a_{ij} + b_{ij}] A + B = [ a ij + b ij ] (add/scalar multiply entry by entry)
Scaler Multiplication : c A = [ c a i j ] cA = [ca_{ij}] c A = [ c a ij ]
Example
[ 2 3 5 − 2 − 1 0 ] + [ − 1 6 3 0 0 2 ] = [ 1 9 8 − 2 − 1 2 ] \begin{bmatrix}
2 & 3 \\
5 & -2 \\
-1 & 0
\end{bmatrix}
+
\begin{bmatrix}
-1 & 6 \\
3 & 0 \\
0 & 2
\end{bmatrix}
=
\begin{bmatrix}
1 & 9 \\
8 & -2 \\
-1 & 2
\end{bmatrix} ⎣ ⎡ 2 5 − 1 3 − 2 0 ⎦ ⎤ + ⎣ ⎡ − 1 3 0 6 0 2 ⎦ ⎤ = ⎣ ⎡ 1 8 − 1 9 − 2 2 ⎦ ⎤
Example
5 [ 2 3 − 1 1 3 − 3 ] = [ 10 15 − 5 5 15 − 15 ] 5
\begin{bmatrix}
2 & 3 & -1 \\
1 & 3 & -3
\end{bmatrix}
=
\begin{bmatrix}
10 & 15 & -5 \\
5 & 15 & -15
\end{bmatrix} 5 [ 2 1 3 3 − 1 − 3 ] = [ 10 5 15 15 − 5 − 15 ]
Example
Vector Sum and Scaler multiplication
v ⃗ = [ 4 3 1 ] \vec{v} = \begin{bmatrix}
4\\
3 \\
1
\end{bmatrix} v = ⎣ ⎡ 4 3 1 ⎦ ⎤
w ⃗ = [ 0 1 − 1 ] \vec{w} =
\begin{bmatrix}
0 \\
1 \\
-1
\end{bmatrix} w = ⎣ ⎡ 0 1 − 1 ⎦ ⎤
v ⃗ + w ⃗ = [ 4 4 0 ] \vec{v} + \vec{w} =
\begin{bmatrix}
4 \\
4 \\
0
\end{bmatrix} v + w = ⎣ ⎡ 4 4 0 ⎦ ⎤
What about matrix/vector products?
Dot product for 2 vectors in R n \mathbb{R}^n R n
A x ⃗ A \vec{x} A x matrix times vector
Definition:
For vectors v ⃗ = [ v 1 v 2 ⋮ v n ] \vec{v} = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix} v = ⎣ ⎡ v 1 v 2 ⋮ v n ⎦ ⎤ and w ⃗ = [ w 1 w 2 ⋮ w n ] \vec{w} = \begin{bmatrix} w_1 \\ w_2 \\ \vdots \\ w_n \end{bmatrix} w = ⎣ ⎡ w 1 w 2 ⋮ w n ⎦ ⎤ in R n \mathbb{R}^n R n , the dot product v ⃗ ∗ w ⃗ \vec{v} * \vec{w} v ∗ w is scaler:
v ⃗ ∗ w ⃗ = v 1 w 1 + v 2 w 2 + v 3 w 3 … = ∑ k = 1 n v k w k \vec{v} * \vec{w} = v_1 w_1 + v_2 w_2 + v_3 w_3 … = \sum_{k=1}^{n} v_k w_k v ∗ w = v 1 w 1 + v 2 w 2 + v 3 w 3 … = ∑ k = 1 n v k w k
Note: dot product does not distinguish between row vectors and column vectors.
Example
[ 5 2 − 3 ] ∗ [ 1 − 1 − 1 ] = 5 ∗ 1 + 2 ( − 1 ) + ( − 3 ) ( − 1 ) = 5 + 2 + 3 = 6 \begin{bmatrix}
5 \\
2 \\
-3
\end{bmatrix}
*
\begin{bmatrix}
1 \\
-1 \\
-1
\end{bmatrix}
= 5 * 1 + 2(-1) + (-3)(-1) = 5 +2 + 3 = 6 ⎣ ⎡ 5 2 − 3 ⎦ ⎤ ∗ ⎣ ⎡ 1 − 1 − 1 ⎦ ⎤ = 5 ∗ 1 + 2 ( − 1 ) + ( − 3 ) ( − 1 ) = 5 + 2 + 3 = 6
An important way to think about dot product:
[ 5 2 − 3 ] [ 1 − 1 − 1 ] \begin{bmatrix} 5 & 2 & -3 \end{bmatrix}
\begin{bmatrix}
1 \\
-1 \\
-1
\end{bmatrix} [ 5 2 − 3 ] ⎣ ⎡ 1 − 1 − 1 ⎦ ⎤
The product A x ⃗ A\vec{x} A x : Suppose A A A is n × m n\times m n × m and x ⃗ = [ x 1 x 2 ⋮ x m ] \vec{x} = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_m \end{bmatrix} x = ⎣ ⎡ x 1 x 2 ⋮ x m ⎦ ⎤
Size: ( n × m ) ( m × 1 ) → n × 1 \left( n\times m \right) \left( m \times 1\right) \to n \times 1 ( n × m ) ( m × 1 ) → n × 1
Way 1: Row Viewport
A = [ − − w 1 ⃗ − − − − w 2 ⃗ − − ⋮ − − w n ⃗ − − ] A = \begin{bmatrix}
-- \vec{w_1} -- \\
-- \vec{w_2} -- \\
\vdots \\
-- \vec{w_n} -- \\
\end{bmatrix} A = ⎣ ⎡ − − w 1 − − − − w 2 − − ⋮ − − w n − − ⎦ ⎤
Note: w ⃗ i ∈ R m \vec{w}_i \in \mathbb{R}^m w i ∈ R m
A x ⃗ = [ w 1 ⃗ ∗ x ⃗ w 2 ⃗ ∗ x ⃗ ⋮ w n ⃗ ∗ x ⃗ ] A\vec{x} =
\begin{bmatrix}
\vec{w_1} * \vec{x} \\
\vec{w_2} * \vec{x} \\
\vdots \\
\vec{w_n} * \vec{x}
\end{bmatrix} A x = ⎣ ⎡ w 1 ∗ x w 2 ∗ x ⋮ w n ∗ x ⎦ ⎤
(Size n × 1 n \times 1 n × 1 )
Way 2: Column Viewport
A = [ ∣ ∣ ∣ v 1 ⃗ v 2 ⃗ ⋯ v m ⃗ ∣ ∣ ∣ ] A = \begin{bmatrix}
| & | & & | \\
\vec{v_1} & \vec{v_2} & \cdots & \vec{v_m} \\
| & | & & | \\
\end{bmatrix} A = ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v m ∣ ⎦ ⎤
v j ⃗ ∈ R n \vec{v_j} \in \mathbb{R}^n v j ∈ R n
A x ⃗ = x 1 v 1 ⃗ + x 2 v 2 ⃗ + ⋯ + x m v m ⃗ A \vec{x} = x_1 \vec{v_1} + x_2 \vec{v_2} + \cdots + x_m \vec{v_m} A x = x 1 v 1 + x 2 v 2 + ⋯ + x m v m
(Size n × 1 n \times 1 n × 1 )
Example
[ 5 − 1 2 6 4 3 0 1 − 1 0 2 − 1 ] [ 0 2 − 1 3 ] = \begin{bmatrix}
5 & -1 & 2 & 6 \\
4 & 3 & 0 & 1 \\
-1 & 0 & 2 & -1
\end{bmatrix}
\begin{bmatrix}
0 \\
2 \\
-1 \\
3
\end{bmatrix}
= ⎣ ⎡ 5 4 − 1 − 1 3 0 2 0 2 6 1 − 1 ⎦ ⎤ ⎣ ⎡ 0 2 − 1 3 ⎦ ⎤ =
0 [ 5 4 − 1 ] + 2 [ − 1 3 0 ] − 1 [ 2 0 2 ] + 3 [ 6 1 − 1 ] = [ 14 9 − 5 ] 0
\begin{bmatrix}
5 \\
4 \\
-1
\end{bmatrix}
+
2 \begin{bmatrix}
-1 \\
3 \\
0
\end{bmatrix}
- 1
\begin{bmatrix}
2 \\
0 \\
2
\end{bmatrix}
+ 3
\begin{bmatrix}
6 \\
1 \\
-1
\end{bmatrix}
=
\begin{bmatrix}
14 \\
9 \\
-5
\end{bmatrix} 0 ⎣ ⎡ 5 4 − 1 ⎦ ⎤ + 2 ⎣ ⎡ − 1 3 0 ⎦ ⎤ − 1 ⎣ ⎡ 2 0 2 ⎦ ⎤ + 3 ⎣ ⎡ 6 1 − 1 ⎦ ⎤ = ⎣ ⎡ 14 9 − 5 ⎦ ⎤
Example
[ 5 − 1 2 6 4 3 0 1 − 1 0 2 − 1 ] [ 2 3 2 ] \begin{bmatrix}
5 & -1 & 2 & 6 \\
4 & 3 & 0 & 1 \\
-1 & 0 & 2 & -1
\end{bmatrix}
\begin{bmatrix}
2 \\
3 \\
2
\end{bmatrix} ⎣ ⎡ 5 4 − 1 − 1 3 0 2 0 2 6 1 − 1 ⎦ ⎤ ⎣ ⎡ 2 3 2 ⎦ ⎤
Product is not defined
Example
[ 5 − 2 3 1 1 4 − 1 0 0 6 ] [ 2 − 1 ] = [ 10 + 2 6 − 1 2 − 4 − 2 + 0 0 − 6 ] = [ 12 5 − 2 − 2 − 6 ] \begin{bmatrix}
5 & -2 \\
3 & 1 \\
1 & 4 \\
-1 & 0 \\
0 & 6
\end{bmatrix}
\begin{bmatrix}
2 \\
-1
\end{bmatrix}
=
\begin{bmatrix}
10 + 2 \\
6 - 1 \\
2 - 4 \\
-2 + 0 \\
0 - 6
\end{bmatrix}
=
\begin{bmatrix}
12 \\
5 \\
-2 \\
-2 \\
-6
\end{bmatrix} ⎣ ⎡ 5 3 1 − 1 0 − 2 1 4 0 6 ⎦ ⎤ [ 2 − 1 ] = ⎣ ⎡ 10 + 2 6 − 1 2 − 4 − 2 + 0 0 − 6 ⎦ ⎤ = ⎣ ⎡ 12 5 − 2 − 2 − 6 ⎦ ⎤
Definition:
A vector b ⃗ \vec{b} b in R n \mathbb{R}^n R n is a linear combination of v 1 ⃗ , v 2 ⃗ , ⋯ , v m ⃗ \vec{v_1},\ \vec{v_2},\ \cdots,\ \vec{v_m} v 1 , v 2 , ⋯ , v m in R n \mathbb{R}^n R n provided there exists scalars x 1 , x 2 , x 3 , ⋯ , x m x_1,\ x_2,\ x_3,\ \cdots ,\ x_m x 1 , x 2 , x 3 , ⋯ , x m with b ⃗ = x 1 v 1 ⃗ + x 2 v 2 ⃗ + x 3 v 3 ⃗ + ⋯ + x m v m ⃗ \vec{b} = x_1 \vec{v_1} + x_2 \vec{v_2} + x_3 \vec{v_3} + \cdots + x_m \vec{v_m} b = x 1 v 1 + x 2 v 2 + x 3 v 3 + ⋯ + x m v m .
Example
[ 4 10 2 − 3 ] \begin{bmatrix} 4 \\ 10 \\ 2 \\ -3 \end{bmatrix} ⎣ ⎡ 4 10 2 − 3 ⎦ ⎤ is a linear combination of [ 0 2 0 − 1 ] \begin{bmatrix} 0 \\ 2 \\ 0 \\ -1 \end{bmatrix} ⎣ ⎡ 0 2 0 − 1 ⎦ ⎤ and [ 2 0 1 1 ] \begin{bmatrix} 2 \\ 0 \\ 1 \\ 1 \end{bmatrix} ⎣ ⎡ 2 0 1 1 ⎦ ⎤
[ 4 10 2 − 3 ] = 5 [ 0 2 0 − 1 ] + 2 [ 2 0 1 1 ] \begin{bmatrix}
4 \\
10 \\
2 \\
-3
\end{bmatrix}
=
5
\begin{bmatrix}
0 \\
2 \\
0 \\
-1
\end{bmatrix}
+
2
\begin{bmatrix}
2 \\
0 \\
1 \\
1
\end{bmatrix} ⎣ ⎡ 4 10 2 − 3 ⎦ ⎤ = 5 ⎣ ⎡ 0 2 0 − 1 ⎦ ⎤ + 2 ⎣ ⎡ 2 0 1 1 ⎦ ⎤
Example
[ 4 10 2 − 3 ] \begin{bmatrix} 4 \\ 10 \\ 2 \\ -3 \end{bmatrix} ⎣ ⎡ 4 10 2 − 3 ⎦ ⎤ is a linear combination of e 1 ⃗ = [ 1 0 0 0 ] \vec{e_1} = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} e 1 = ⎣ ⎡ 1 0 0 0 ⎦ ⎤ , e 2 ⃗ = [ 0 1 0 0 ] \vec{e_2} = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix} e 2 = ⎣ ⎡ 0 1 0 0 ⎦ ⎤ , e 3 ⃗ = [ 0 0 1 0 ] \vec{e_3} = \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} e 3 = ⎣ ⎡ 0 0 1 0 ⎦ ⎤ , and e 4 ⃗ = [ 0 0 0 1 ] \vec{e_4} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix} e 4 = ⎣ ⎡ 0 0 0 1 ⎦ ⎤ .
In R n \mathbb{R}^n R n vector, for 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n : e i ⃗ \vec{e_i} e i has 1 in i i i th spot and 0 elsewhere.
[ 4 10 2 − 3 ] = 4 e 1 ⃗ + 10 e 2 ⃗ + 2 e 3 ⃗ − 3 e 4 ⃗ \begin{bmatrix}
4 \\
10 \\
2 \\
-3
\end{bmatrix}
=
4 \vec{e_1} + 10 \vec{e_2} + 2 \vec{e_3} - 3 \vec{e_4} ⎣ ⎡ 4 10 2 − 3 ⎦ ⎤ = 4 e 1 + 10 e 2 + 2 e 3 − 3 e 4
Adding vectors with parallelogram rule
Example
[ 0 0 1 ] \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} ⎣ ⎡ 0 0 1 ⎦ ⎤ in R 3 \mathbb{R}^3 R 3 is not linear combination of e 1 ⃗ \vec{e_1} e 1 and e 2 ⃗ \vec{e_2} e 2 . Linear combinations of e 1 ⃗ \vec{e_1} e 1 and e 2 ⃗ \vec{e_2} e 2 just fill out the xy-plane. It cannot traverse the z-axis.
Example
Let b ⃗ = [ 4 10 2 − 3 ] \vec{b} = \begin{bmatrix} 4 \\ 10 \\ 2 \\ -3 \end{bmatrix} b = ⎣ ⎡ 4 10 2 − 3 ⎦ ⎤ . Is b ⃗ \vec{b} b a linear combination of v ⃗ = [ 4 2 1 − 1 ] \vec{v} = \begin{bmatrix} 4 \\ 2 \\ 1 \\ -1 \end{bmatrix} v = ⎣ ⎡ 4 2 1 − 1 ⎦ ⎤ and w ⃗ = [ 2 − 1 1 1 ] \vec{w} = \begin{bmatrix} 2 \\ -1 \\ 1 \\ 1 \end{bmatrix} w = ⎣ ⎡ 2 − 1 1 1 ⎦ ⎤
What we want: scalars x 1 x_1 x 1 , x 2 x_2 x 2 with:
x 1 [ 4 2 1 − 1 ] + x 2 [ 2 − 1 1 1 ] = [ 4 10 2 − 3 ] x_1 \begin{bmatrix}
4 \\
2 \\
1 \\
-1
\end{bmatrix}
+ x_2
\begin{bmatrix}
2 \\
-1 \\
1 \\
1
\end{bmatrix}
=
\begin{bmatrix}
4 \\
10 \\
2 \\
-3
\end{bmatrix} x 1 ⎣ ⎡ 4 2 1 − 1 ⎦ ⎤ + x 2 ⎣ ⎡ 2 − 1 1 1 ⎦ ⎤ = ⎣ ⎡ 4 10 2 − 3 ⎦ ⎤
(We will finish this next lecture)
Quiz 1 Preparation
Example
Solve the linear system by elementary row operations.
[ 1 6 2 − 5 ∣ 3 0 0 2 − 8 ∣ 2 1 6 1 − 1 ∣ 2 ] ⟹ − R 1 + R 2 [ 1 6 2 − 5 ∣ 3 0 0 2 − 8 ∣ 2 0 0 − 1 − 4 ∣ 2 ] \begin{bmatrix}
1 & 6 & 2 & -5 & \big| & 3 \\
0 & 0 & 2 & -8 & \big| & 2 \\
1 & 6 & 1 & -1 & \big| & 2
\end{bmatrix}
\overset{-R_1 + R_2}{\implies}
\begin{bmatrix}
1 & 6 & 2 & -5 & \big| & 3 \\
0 & 0 & 2 & -8 & \big| & 2 \\
0 & 0 & -1 & -4 & \big| & 2
\end{bmatrix} ⎣ ⎡ 1 0 1 6 0 6 2 2 1 − 5 − 8 − 1 ∣ ∣ ∣ ∣ ∣ ∣ 3 2 2 ⎦ ⎤ ⟹ − R 1 + R 2 ⎣ ⎡ 1 0 0 6 0 0 2 2 − 1 − 5 − 8 − 4 ∣ ∣ ∣ ∣ ∣ ∣ 3 2 2 ⎦ ⎤
⟹ 1 2 R 2 [ 1 6 2 − 5 ∣ 3 0 0 1 − 4 ∣ 1 0 0 − 1 − 4 ∣ 2 ] ⟹ R 2 + R 3 [ 1 6 2 − 5 ∣ 3 0 0 1 − 4 ∣ 1 0 0 0 0 ∣ 2 ] \overset{\frac{1}{2} R_2}{\implies}
\begin{bmatrix}
1 & 6 & 2 & -5 & \big| & 3 \\
0 & 0 & 1 & -4 & \big| & 1 \\
0 & 0 & -1 & -4 & \big| & 2
\end{bmatrix}
\overset{R_2 + R_3}{\implies}
\begin{bmatrix}
1 & 6 & 2 & -5 & \big| & 3 \\
0 & 0 & 1 & -4 & \big| & 1 \\
0 & 0 & 0& 0 & \big| & 2
\end{bmatrix} ⟹ 2 1 R 2 ⎣ ⎡ 1 0 0 6 0 0 2 1 − 1 − 5 − 4 − 4 ∣ ∣ ∣ ∣ ∣ ∣ 3 1 2 ⎦ ⎤ ⟹ R 2 + R 3 ⎣ ⎡ 1 0 0 6 0 0 2 1 0 − 5 − 4 0 ∣ ∣ ∣ ∣ ∣ ∣ 3 1 2 ⎦ ⎤
⟹ − R 1 + R 1 [ 1 6 0 3 ∣ 1 0 0 1 − 4 ∣ 1 0 0 0 0 ∣ 2 ] \overset{-R_1 + R_1}{\implies}
\begin{bmatrix}
1 & 6 & 0 & 3 & \big| & 1 \\
0 & 0 & 1 & -4 & \big| & 1 \\
0 & 0 & 0& 0 & \big| & 2
\end{bmatrix} ⟹ − R 1 + R 1 ⎣ ⎡ 1 0 0 6 0 0 0 1 0 3 − 4 0 ∣ ∣ ∣ ∣ ∣ ∣ 1 1 2 ⎦ ⎤
x 2 = 5 x_2 = 5 x 2 = 5
x 4 = 5 x_4 = 5 x 4 = 5
x 1 = 1 − 6 s − 3 t x_1 = 1 - 6s - 3t x 1 = 1 − 6 s − 3 t
x 3 = 1 + 4 t x_3 = 1 + 4t x 3 = 1 + 4 t
[ x 1 x 2 x 3 x 4 ] = [ 1 − 6 s − 3 t s 1 + 4 t t ] \begin{bmatrix}
x_1 \\
x_2 \\
x_3 \\
x_4
\end{bmatrix}
=
\begin{bmatrix}
1-6s-3t \\
s \\
1+4t \\
t
\end{bmatrix} ⎣ ⎡ x 1 x 2 x 3 x 4 ⎦ ⎤ = ⎣ ⎡ 1 − 6 s − 3 t s 1 + 4 t t ⎦ ⎤
Example
Find all polynomails of the form f ( t ) = a + b t + c t 2 f(t) = a + bt + ct^2 f ( t ) = a + b t + c t 2 with the point (1, 6) on the graph of f f f such that f ’ ( 2 ) = 9 f’(2) = 9 f ’ ( 2 ) = 9 and f ’‘ ( 8 ) = 4 f’‘(8) = 4 f ’‘ ( 8 ) = 4 .
f ’ ( t ) = b + 2 c t f’(t) = b + 2ct f ’ ( t ) = b + 2 c t
f ’‘ ( t ) = 2 c f’‘(t) = 2c f ’‘ ( t ) = 2 c
f ( 1 ) = 6 → a + b + c = 6 f(1) = 6 \to a + b + c = 6 f ( 1 ) = 6 → a + b + c = 6
f ’ ( 2 ) = 9 → b + 4 c = 9 f’(2) = 9 \to b + 4c = 9 f ’ ( 2 ) = 9 → b + 4 c = 9
f ’‘ ( 8 ) = 4 → 2 c = 4 f’‘(8) = 4 \to 2c = 4 f ’‘ ( 8 ) = 4 → 2 c = 4
c = 2 c = 2 c = 2
b + 2 = 9 ⟹ b = 1 b + 2 = 9 \implies b = 1 b + 2 = 9 ⟹ b = 1
a + 1 + 2 = 6 ⟹ a = 3 a + 1 + 2 = 6 \implies a=3 a + 1 + 2 = 6 ⟹ a = 3
f ( t ) = 3 + t + 2 t 2 f(t) = 3 + t + 2t^2 f ( t ) = 3 + t + 2 t 2
Example
Find one value c c c so that the agumented matrix below corresponds to an inconsistent linear system.
[ 1 2 − 1 ∣ 3 2 4 − 2 ∣ c ] \begin{bmatrix}
1 & 2 & -1 & \big| & 3 \\
2 & 4 & -2 & \big| & c
\end{bmatrix} [ 1 2 2 4 − 1 − 2 ∣ ∣ ∣ ∣ 3 c ]
Note that in order for an inconsistent linear system, you need the form: [ 0 0 0 ∣ b ] \begin{bmatrix} 0 & 0 & 0 & \big| & b \end{bmatrix} [ 0 0 0 ∣ ∣ b ]
[ 1 2 − 1 ∣ 3 2 4 − 2 ∣ c ] ⟹ 2 R 1 − R 2 [ 1 2 − 1 ∣ 3 0 0 0 ∣ 6 − c ] \begin{bmatrix}
1 & 2 & -1 & \big| & 3 \\
2 & 4 & -2 & \big| & c
\end{bmatrix}
\overset{2R_1 - R_2}{\implies}
\begin{bmatrix}
1 & 2 & -1 & \big| & 3 \\
0 & 0 & 0 & \big| & 6 - c
\end{bmatrix} [ 1 2 2 4 − 1 − 2 ∣ ∣ ∣ ∣ 3 c ] ⟹ 2 R 1 − R 2 [ 1 0 2 0 − 1 0 ∣ ∣ ∣ ∣ 3 6 − c ]
So when c ≠ 6 c \neq 6 c = 6 .
Example
Consider the matriceis A A A , B B B , C C C , D D D below.
A = [ 1 3 0 − 1 5 0 1 0 9 0 0 0 0 0 0 0 0 1 1 4 ] A =
\begin{bmatrix}
1 & 3 & 0 & -1 & 5 \\
0 & 1 & 0 & 9 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 1 & 4 \\
\end{bmatrix} A = ⎣ ⎡ 1 0 0 0 3 1 0 0 0 0 0 1 − 1 9 0 1 5 0 0 4 ⎦ ⎤
B = [ 0 1 6 0 3 − 1 0 0 0 1 2 2 0 0 0 0 0 0 ] B =
\begin{bmatrix}
0 & 1 & 6 & 0 & 3 & -1 \\
0 & 0 & 0 & 1 & 2 & 2 \\
0 & 0 & 0 & 0 & 0 & 0
\end{bmatrix} B = ⎣ ⎡ 0 0 0 1 0 0 6 0 0 0 1 0 3 2 0 − 1 2 0 ⎦ ⎤
C = [ 0 1 0 2 4 ] C =
\begin{bmatrix}
0 & 1 & 0 & 2 & 4
\end{bmatrix} C = [ 0 1 0 2 4 ]
D = [ 0 1 0 2 4 ] D =
\begin{bmatrix}
0 \\
1 \\
0 \\
2 \\
4
\end{bmatrix} D = ⎣ ⎡ 0 1 0 2 4 ⎦ ⎤
a) Which of the matrices are in reduced row-echelon form (rref)?
Solution
B, C
b) List the rank of each matrix
Solution
rank(A A A ) = 3
rank(B B B ) = 2
rank(C C C ) = rank(D D D ) = 1
A linear system is consistent if and only if rank of coefficient matrix equals tank of augmented matrix. For example, this would change the rank:
[ ⋮ ∥ ⋮ 0 ∥ 1 ] \begin{bmatrix}
\vdots & \big\| & \vdots \\
0 & \big\| & 1
\end{bmatrix} [ ⋮ 0 ∥ ∥ ∥ ∥ ⋮ 1 ]
Recall
A x ⃗ A \vec{x} A x for A A A an n × m n \times m n × m matrix and x ⃗ = [ x 1 ⋮ x m ] \vec{x} = \begin{bmatrix} x_1 \\ \vdots \\ x_m \end{bmatrix} x = ⎣ ⎡ x 1 ⋮ x m ⎦ ⎤
Row Viewport :
Suppose w 1 ⃗ , w 2 ⃗ , ⋯ , w n ⃗ \vec{w_1}, \vec{w_2}, \cdots, \vec{w_n} w 1 , w 2 , ⋯ , w n in R m \mathbb{R}^m R m are the rows of A A A , then:
A x ⃗ = [ − w 1 ⃗ ∗ x ⃗ − − w 2 ⃗ ∗ x ⃗ − ⋮ − w m ⃗ ∗ x ⃗ − ] A\vec{x} =
\begin{bmatrix}
- & \vec{w_1} * \vec{x} & - \\
- & \vec{w_2} * \vec{x} & - \\
& \vdots & \\
- & \vec{w_m} * \vec{x} & - \\
\end{bmatrix} A x = ⎣ ⎡ − − − w 1 ∗ x w 2 ∗ x ⋮ w m ∗ x − − − ⎦ ⎤
i th entry of A x ⃗ A \vec{x} A x is [Row i of A A A ] ⋅ x ⃗ \cdot \vec{x} ⋅ x
Column Viewport :
Suppose v 1 ⃗ , v 2 ⃗ , ⋯ , v m ⃗ \vec{v_1},\ \vec{v_2},\ \cdots ,\ \vec{v_m} v 1 , v 2 , ⋯ , v m in R n \mathbb{R}^n R n are ithe columns of A A A , i.e. A = [ ∣ ∣ ∣ v 1 ⃗ v 2 ⃗ ⋯ v m ⃗ ∣ ∣ ∣ ] A = \begin{bmatrix} | & | && | \\ \vec{v_1} & \vec{v_2} & \cdots & \vec{v_m} \\ | & | && | \end{bmatrix} A = ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v m ∣ ⎦ ⎤
Then, A x ⃗ = x 1 v 1 ⃗ + x 2 v 2 ⃗ + ⋯ + x m v m ⃗ A \vec{x} = x_1 \vec{v_1} + x_2 \vec{v_2} + \cdots + x_m \vec{v_m} A x = x 1 v 1 + x 2 v 2 + ⋯ + x m v m
Properties of the product A x ⃗ A\vec{x} A x : Suppose A A A is n × m n\times m n × m , x ⃗ \vec{x} x , y ⃗ \vec{y} y are in R m \mathbb{R}^m R m and k k k is a scalar
A ( x ⃗ + y ⃗ ) = A x ⃗ + A y ⃗ A(\vec{x} + \vec{y}) = A\vec{x} + A\vec{y} A ( x + y ) = A x + A y
A ( k x ⃗ ) = k A x ⃗ A(k\vec{x}) = kA\vec{x} A ( k x ) = k A x
Justification of 2:
k x ⃗ = [ k x 1 k x 2 ⋮ k x m ] k\vec{x} = \begin{bmatrix} kx_1 \\ kx_2 \\ \vdots \\ kx_m \end{bmatrix} k x = ⎣ ⎡ k x 1 k x 2 ⋮ k x m ⎦ ⎤
A ( k x ⃗ ) = ( k x 1 ) v 1 ⃗ + ( k x 2 ) v 2 ⃗ + ⋯ + ( k x m ) v m ⃗ A(k\vec{x}) = (kx_1) \vec{v_1} + (kx_2)\vec{v_2} + \cdots + (kx_m) \vec{v_m} A ( k x ) = ( k x 1 ) v 1 + ( k x 2 ) v 2 + ⋯ + ( k x m ) v m
= k ( x 1 v 1 ⃗ + x 2 v 2 ⃗ + ⋯ + x m v m ⃗ ) = k(x_1 \vec{v_1} + x_2 \vec{v_2} + \cdots + x_m \vec{v_m}) = k ( x 1 v 1 + x 2 v 2 + ⋯ + x m v m )
= k A x ⃗ = kA\vec{x} = k A x
We continue with this question: is [ 4 10 2 − 3 ] \begin{bmatrix} 4 \\ 10 \\ 2 \\ -3 \end{bmatrix} ⎣ ⎡ 4 10 2 − 3 ⎦ ⎤ a linear combination of [ 4 2 1 − 1 ] \begin{bmatrix} 4 \\ 2 \\ 1 \\ -1 \end{bmatrix} ⎣ ⎡ 4 2 1 − 1 ⎦ ⎤ and [ 2 − 1 1 1 ] \begin{bmatrix} 2 \\ -1 \\ 1 \\ 1 \end{bmatrix} ⎣ ⎡ 2 − 1 1 1 ⎦ ⎤ ?
Can we find x 1 x_1 x 1 , x 2 x_2 x 2 scalars such that x 1 [ 4 2 1 − 1 ] + x 2 [ 2 − 1 1 1 ] = [ 4 10 2 − 3 ] x_1 \begin{bmatrix} 4 \\ 2 \\ 1 \\ -1 \end{bmatrix} + x_2 \begin{bmatrix} 2 \\ -1 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 4 \\ 10 \\ 2 \\ -3 \end{bmatrix} x 1 ⎣ ⎡ 4 2 1 − 1 ⎦ ⎤ + x 2 ⎣ ⎡ 2 − 1 1 1 ⎦ ⎤ = ⎣ ⎡ 4 10 2 − 3 ⎦ ⎤ ?
Is there a solution to the linear system [ 4 2 ∣ 4 2 − 1 ∣ 10 1 2 ∣ 2 − 1 1 ∣ − 3 ] \begin{bmatrix} 4 & 2 & \big| & 4 \\ 2 & -1 & \big| & 10 \\ 1 & 2 & \big| & 2 \\ -1 & 1 & \big| & -3 \end{bmatrix} ⎣ ⎡ 4 2 1 − 1 2 − 1 2 1 ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ 4 10 2 − 3 ⎦ ⎤ ?
[ 4 2 ∥ 4 2 − 1 ∥ 10 1 1 ∥ 2 − 1 1 ∥ − 3 ] ⟹ R 1 ↔ R 3 [ 1 1 ∥ 2 2 − 1 ∥ 10 4 2 ∥ 4 − 1 1 ∥ − 3 ] \begin{bmatrix}
4 & 2 & \big\| & 4 \\
2 & -1 & \big\| & 10 \\
1 & 1 & \big\| & 2 \\
-1 & 1 & \big\| & -3
\end{bmatrix}
\overset{R_1 \leftrightarrow R_3}{\implies}
\begin{bmatrix}
1 & 1 & \big\| & 2 \\
2 & -1 & \big\| & 10 \\
4 & 2 & \big\| & 4 \\
-1 & 1 & \big\| & -3
\end{bmatrix} ⎣ ⎡ 4 2 1 − 1 2 − 1 1 1 ∥ ∥ ∥ ∥ ∥ ∥ ∥ ∥ 4 10 2 − 3 ⎦ ⎤ ⟹ R 1 ↔ R 3 ⎣ ⎡ 1 2 4 − 1 1 − 1 2 1 ∥ ∥ ∥ ∥ ∥ ∥ ∥ ∥ 2 10 4 − 3 ⎦ ⎤
⟹ [ 1 1 ∥ 2 0 − 3 ∥ 6 0 − 2 ∥ − 4 0 2 ∥ − 1 ] ⟹ [ 1 1 ∥ 2 0 1 ∥ − 2 0 0 ∥ − 8 0 0 ∥ 3 ] \implies
\begin{bmatrix}
1 & 1 & \big\| & 2 \\
0 & -3 & \big\| & 6 \\
0 & -2 & \big\| & -4 \\
0 & 2 & \big\| & -1
\end{bmatrix}
\implies
\begin{bmatrix}
1 & 1 & \big\| & 2 \\
0 & 1 & \big\| & -2 \\
0 & 0 & \big\| & -8 \\
0 & 0 & \big\| & 3
\end{bmatrix} ⟹ ⎣ ⎡ 1 0 0 0 1 − 3 − 2 2 ∥ ∥ ∥ ∥ ∥ ∥ ∥ ∥ 2 6 − 4 − 1 ⎦ ⎤ ⟹ ⎣ ⎡ 1 0 0 0 1 1 0 0 ∥ ∥ ∥ ∥ ∥ ∥ ∥ ∥ 2 − 2 − 8 3 ⎦ ⎤
This linear system is inconsistent so: No, there is no solution.
We see
[ 4 2 ∥ 4 2 − 1 ∥ 10 1 1 ∥ 2 − 1 1 ∥ − 3 ] ↔ [ 4 2 2 − 1 1 1 − 1 1 ] [ x 1 x 2 ] = [ 4 10 2 − 3 ] \begin{bmatrix}
4 & 2 & \big\| & 4 \\
2 & -1 & \big\| & 10 \\
1 & 1 & \big\| & 2 \\
-1 & 1 & \big\| & -3 \\
\end{bmatrix}
\leftrightarrow
\begin{bmatrix}
4 & 2 \\
2 & -1 \\
1 & 1 \\
-1 & 1
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}
=
\begin{bmatrix}
4 \\
10 \\
2 \\
-3
\end{bmatrix} ⎣ ⎡ 4 2 1 − 1 2 − 1 1 1 ∥ ∥ ∥ ∥ ∥ ∥ ∥ ∥ 4 10 2 − 3 ⎦ ⎤ ↔ ⎣ ⎡ 4 2 1 − 1 2 − 1 1 1 ⎦ ⎤ [ x 1 x 2 ] = ⎣ ⎡ 4 10 2 − 3 ⎦ ⎤
This correspondence works generally:
A linear system with augmented matrix [ A ∣ b ⃗ ] \begin{bmatrix} A & \big| & \vec{b} \end{bmatrix} [ A ∣ ∣ b ] can be written in matrix form as A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b .
Moreover, this system is consistent if and only if b ⃗ \vec{b} b is a linear combination of the columns of A A A . (More in sections 3.1-3.3, 5.4)
2.1 Introduction to Linear Transformation
Recall that a function f : R m → R n f : \mathbb{R}^m \to \mathbb{R}^n f : R m → R n is a rule that assigns to each vector in R m \mathbb{R}^m R m a unique vector in R n \mathbb{R}^n R n .
Domain: R m \mathbb{R}^m R m
Codomain/target space: R n \mathbb{R}^n R n
Image/range: { f ( x ⃗ ) : x ∈ R m } \{ f(\vec{x}) : x \in \mathbb{R}^m \} { f ( x ) : x ∈ R m }
Example
f : R 3 → R f : \mathbb{R}^3 \to \mathbb{R} f : R 3 → R given by f [ x 1 x 2 x 3 ] = x 1 2 + x 2 2 + x 3 3 f \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \sqrt{x_1^2 + x_2^2 + x_3^3} f ⎣ ⎡ x 1 x 2 x 3 ⎦ ⎤ = x 1 2 + x 2 2 + x 3 3
This is given the length of the vector.
Domain : R 3 \mathbb{R}^3 R 3
Range : [ 0 , ∞ ) [0, \infty) [ 0 , ∞ )
Definition:
A function T : R m → R n T : \mathbb{R}^m \to \mathbb{R}^n T : R m → R n is a linear transformation provided there exists an n × m n \times m n × m matrix A A A such that T ( x ⃗ ) = A x ⃗ T(\vec{x}) = A\vec{x} T ( x ) = A x for all x ⃗ ∈ R m \vec{x} \in \mathbb{R}^m x ∈ R m .
Comments:
“Linear functions” in calculus 1/2/3: graph is a line/plane/3-space
Examples:
f ( x ) = 5 x + 4 f(x) = 5x + 4 f ( x ) = 5 x + 4
f ( x , y ) = 2 x − 3 y + 8 f(x,\ y) = 2x - 3y + 8 f ( x , y ) = 2 x − 3 y + 8
But not all of these are linear transformations. These should be called affine.
For any n × m n\times m n × m matrix A A A , A 0 ⃗ = 0 ⃗ A\vec{0} = \vec{0} A 0 = 0 : For any linear transformation T : T ( 0 ⃗ ) = 0 ⃗ T: T(\vec{0}) = \vec{0} T : T ( 0 ) = 0 .
Example
For scalars, a a a , b b b , c c c , the function g ( x , y , z ) = a x + b y + c z g(x,\ y,\ z) = ax + by + cz g ( x , y , z ) = a x + b y + cz is a linear transformation.
g : R 3 → R g : \mathbb{R}^3 \to \mathbb{R} g : R 3 → R
g [ x y z ] = [ a b c ] [ x y z ] g \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} a & b & c \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} g ⎣ ⎡ x y z ⎦ ⎤ = [ a b c ] ⎣ ⎡ x y z ⎦ ⎤
The matrix of g g g is: [ a b c ] \begin{bmatrix} a & b & c \end{bmatrix} [ a b c ]
Example
The function f ( x ) = [ a 5 − x ] f(x) = \begin{bmatrix} a \\ 5 \\ -x \end{bmatrix} f ( x ) = ⎣ ⎡ a 5 − x ⎦ ⎤ is not a linear transformation.
f : R → R 3 f : \mathbb{R} \to \mathbb{R}^3 f : R → R 3
f ( 0 ) = [ 0 5 0 ] ≠ 0 ⃗ f(0) = \begin{bmatrix} 0 \\ 5 \\ 0 \end{bmatrix} \neq \vec{0} f ( 0 ) = ⎣ ⎡ 0 5 0 ⎦ ⎤ = 0
Therefore f f f is not a linear transformation.
Question: What is the linear transformation corresponding to I 3 = [ 1 0 0 0 1 0 0 0 1 ] I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} I 3 = ⎣ ⎡ 1 0 0 0 1 0 0 0 1 ⎦ ⎤ ?
[ 1 0 0 0 1 0 0 0 1 ] [ x y z ] = x [ 1 0 0 ] + y [ 0 1 0 ] + z [ 0 0 1 ] = [ x y z ] \begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{bmatrix}
\begin{bmatrix}
x \\
y \\
z
\end{bmatrix}
=
x
\begin{bmatrix}
1 \\
0 \\
0
\end{bmatrix}
+ y
\begin{bmatrix}
0 \\
1 \\
0
\end{bmatrix}
+ z
\begin{bmatrix}
0 \\
0 \\
1
\end{bmatrix}
=
\begin{bmatrix}
x \\
y \\
z
\end{bmatrix} ⎣ ⎡ 1 0 0 0 1 0 0 0 1 ⎦ ⎤ ⎣ ⎡ x y z ⎦ ⎤ = x ⎣ ⎡ 1 0 0 ⎦ ⎤ + y ⎣ ⎡ 0 1 0 ⎦ ⎤ + z ⎣ ⎡ 0 0 1 ⎦ ⎤ = ⎣ ⎡ x y z ⎦ ⎤
Answer: Identity map. It maps any matrix to itself.
Consider T ( x ⃗ ) = A x ⃗ T(\vec{x}) = A\vec{x} T ( x ) = A x where A = [ 5 1 3 4 − 1 6 2 0 7 3 2 5 ] A = \begin{bmatrix} 5 & 1 & 3 \\ 4 & -1 & 6 \\ 2 & 0 & 7 \\ 3 & 2 & 5 \end{bmatrix} A = ⎣ ⎡ 5 4 2 3 1 − 1 0 2 3 6 7 5 ⎦ ⎤ . Find T ( e 1 ⃗ ) T(\vec{e_1}) T ( e 1 ) , T ( e 2 ⃗ ) T(\vec{e_2}) T ( e 2 ) , and T ( e 3 ⃗ ) T(\vec{e_3}) T ( e 3 ) .
Recall that e 1 ⃗ = [ 1 0 0 ] \vec{e_1} = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} e 1 = ⎣ ⎡ 1 0 0 ⎦ ⎤ , e 2 ⃗ = [ 0 1 0 ] \vec{e_2} = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} e 2 = ⎣ ⎡ 0 1 0 ⎦ ⎤ , e 3 ⃗ = [ 0 0 1 ] \vec{e_3} = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} e 3 = ⎣ ⎡ 0 0 1 ⎦ ⎤
Note: A A A is 4 × 3 4\times 3 4 × 3 . T : R 3 → R 4 T : \mathbb{R}^3 \to \mathbb{R}^4 T : R 3 → R 4
T ( e 1 ⃗ ) = [ 5 4 2 3 ] T(\vec{e_1}) =
\begin{bmatrix}
5 \\
4 \\
2 \\
3
\end{bmatrix} T ( e 1 ) = ⎣ ⎡ 5 4 2 3 ⎦ ⎤
T ( e 2 ⃗ ) = [ 1 − 1 0 2 ] T(\vec{e_2}) =
\begin{bmatrix}
1 \\
-1 \\
0 \\
2
\end{bmatrix} T ( e 2 ) = ⎣ ⎡ 1 − 1 0 2 ⎦ ⎤
T ( e 3 ⃗ ) = [ 3 6 7 5 ] T(\vec{e_3}) =
\begin{bmatrix}
3 \\
6 \\
7 \\
5
\end{bmatrix} T ( e 3 ) = ⎣ ⎡ 3 6 7 5 ⎦ ⎤
Suppose T : R m → R n T : \mathbb{R}^m \to \mathbb{R}^n T : R m → R n is a linear transformation.
The matrix of T T T is
[ ∣ ∣ ∣ T ( e 1 ⃗ ) T ( e 2 ⃗ ) ⋯ T ( e m ⃗ ) ∣ ∣ ∣ ] \begin{bmatrix}
| & | & & | \\
T(\vec{e_1}) & T(\vec{e_2}) & \cdots & T(\vec{e_m}) \\
| & | & & | \\
\end{bmatrix} ⎣ ⎡ ∣ T ( e 1 ) ∣ ∣ T ( e 2 ) ∣ ⋯ ∣ T ( e m ) ∣ ⎦ ⎤
Where e 1 ⃗ , e 2 ⃗ , ⋯ , e m ⃗ \vec{e_1},\ \vec{e_2},\ \cdots ,\ \vec{e_m} e 1 , e 2 , ⋯ , e m standard vectors in R m \mathbb{R}^m R m . e.i.: 1’s in the ith spot, 0’s elsewhere
Example
Find the matrix of the transformation T : R 4 → R 2 T : \mathbb{R}^4 \to \mathbb{R}^2 T : R 4 → R 2 given by T [ x 1 x 2 x 3 x 4 ] = [ x 4 2 x 2 ] T \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = \begin{bmatrix} x_4 \\ 2x_2 \end{bmatrix} T ⎣ ⎡ x 1 x 2 x 3 x 4 ⎦ ⎤ = [ x 4 2 x 2 ] .
T ( e 1 ⃗ ) = [ 0 0 ] T(\vec{e_1}) = \begin{bmatrix} 0 \\ 0 \end{bmatrix} T ( e 1 ) = [ 0 0 ]
T ( e 2 ⃗ ) = [ 0 2 ] T(\vec{e_2}) = \begin{bmatrix} 0 \\ 2 \end{bmatrix} T ( e 2 ) = [ 0 2 ]
T ( e 3 ⃗ ) = [ 0 0 ] T(\vec{e_3}) = \begin{bmatrix} 0 \\ 0 \end{bmatrix} T ( e 3 ) = [ 0 0 ]
T ( e 4 ⃗ ) = [ 1 0 ] T(\vec{e_4}) = \begin{bmatrix} 1 \\ 0 \end{bmatrix} T ( e 4 ) = [ 1 0 ]
A = [ 0 0 0 1 0 2 0 0 ] A = \begin{bmatrix} 0 & 0 & 0 & 1 \\ 0 & 2 & 0 & 0 \end{bmatrix} A = [ 0 0 0 2 0 0 1 0 ]
Check:
[ 0 0 0 1 0 2 0 0 ] [ x 1 x 2 x 3 x 4 ] = [ x 4 2 x 2 ] \begin{bmatrix}
0 & 0 & 0 & 1 \\
0 & 2 & 0 & 0
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2 \\
x_3 \\
x_4
\end{bmatrix}
=
\begin{bmatrix}
x_4 \\
2x_2
\end{bmatrix} [ 0 0 0 2 0 0 1 0 ] ⎣ ⎡ x 1 x 2 x 3 x 4 ⎦ ⎤ = [ x 4 2 x 2 ]
Example
Find the matrix of this transformation from R 2 \mathbb{R}^2 R 2 to R 4 \mathbb{R}^4 R 4 given by ∣ y 1 = 9 x 1 + 3 x 2 y 2 = 2 x 1 − 9 x 2 y 3 = 4 x 1 − 9 x 2 y 4 = 5 x 1 + x 2 ∣ \begin{vmatrix} y_1 = 9x_1 + 3x_2 \\ y_2 = 2x_1 - 9x_2 \\ y_3 = 4x_1 - 9x_2 \\ y_4 = 5x_1 + x_2 \end{vmatrix} ∣ ∣ y 1 = 9 x 1 + 3 x 2 y 2 = 2 x 1 − 9 x 2 y 3 = 4 x 1 − 9 x 2 y 4 = 5 x 1 + x 2 ∣ ∣ .
e 1 ⃗ = T ( [ 1 0 ] ) = [ 9 2 4 5 ] \vec{e_1} = T\left( \begin{bmatrix} 1 \\ 0 \end{bmatrix} \right) = \begin{bmatrix} 9 \\ 2 \\ 4 \\5 \end{bmatrix} e 1 = T ( [ 1 0 ] ) = ⎣ ⎡ 9 2 4 5 ⎦ ⎤
e 1 ⃗ = T ( [ 0 1 ] ) = [ 3 − 9 − 9 1 ] \vec{e_1} = T \left( \begin{bmatrix} 0 \\ 1 \end{bmatrix} \right) = \begin{bmatrix} 3 \\ -9 \\ -9 \\ 1 \end{bmatrix} e 1 = T ( [ 0 1 ] ) = ⎣ ⎡ 3 − 9 − 9 1 ⎦ ⎤
A = [ 9 3 2 − 9 4 − 9 5 1 ] A = \begin{bmatrix}
9 & 3 \\
2 & -9 \\
4 & -9 \\
5 & 1
\end{bmatrix} A = ⎣ ⎡ 9 2 4 5 3 − 9 − 9 1 ⎦ ⎤
Theorem:
A function T : R m → R n T : \mathbb{R}^m \to \mathbb{R}^n T : R m → R n is a linear transformation if and only if T T T satisfies:
T ( v ⃗ + w ⃗ ) = T ( v ⃗ ) + T ( w ⃗ ) T(\vec{v} + \vec{w}) = T(\vec{v}) + T(\vec{w}) T ( v + w ) = T ( v ) + T ( w ) for all v ⃗ \vec{v} v , w ⃗ \vec{w} w in R n \mathbb{R}^n R n
T ( k v ⃗ ) = k T ( v ⃗ ) T(k\vec{v}) = kT(\vec{v}) T ( k v ) = k T ( v ) for all v ⃗ \vec{v} v in R n \mathbb{R}^n R n and scalars k k k .
Proof:
If T : R m → R n T : \mathbb{R}^m \to \mathbb{R}^n T : R m → R n is a linear transformation, there is an n × m n \times m n × m matrix A A A with T ( x ⃗ ) = A x ⃗ T(\vec{x}) = A\vec{x} T ( x ) = A x . (1) and (2) hold from matrix properties.
Assume T : R m → R m T : \mathbb{R}^m \to \mathbb{R}^m T : R m → R m satisfies (1) and (2). Find matrix A A A with T ( x ⃗ ) = A x ⃗ T(\vec{x}) = A\vec{x} T ( x ) = A x for all x ⃗ \vec{x} x in R m \mathbb{R}^m R m .
Let A = [ ∣ ∣ ∣ T ( e 1 ⃗ ) T ( e 2 ⃗ ) ⋯ T ( e m ⃗ ) ∣ ∣ ∣ ] A = \begin{bmatrix} | & | & & | \\ T(\vec{e_1}) & T(\vec{e_2}) & \cdots & T(\vec{e_m}) \\ | & | & & | \end{bmatrix} A = ⎣ ⎡ ∣ T ( e 1 ) ∣ ∣ T ( e 2 ) ∣ ⋯ ∣ T ( e m ) ∣ ⎦ ⎤ . Let x ⃗ = [ x 1 ⋮ x m ] \vec{x} = \begin{bmatrix} x_1 \\ \vdots \\ x_m \end{bmatrix} x = ⎣ ⎡ x 1 ⋮ x m ⎦ ⎤
A x ⃗ = x 1 T ( e 1 ⃗ ) + x 2 T ( e 2 ⃗ ) + ⋯ + x m T ( e m ⃗ ) A \vec{x} = x_1 T(\vec{e_1}) + x_2 T(\vec{e_2}) + \cdots + x_m T(\vec{e_m}) A x = x 1 T ( e 1 ) + x 2 T ( e 2 ) + ⋯ + x m T ( e m )
A x ⃗ = T ( x 1 e 1 ⃗ ) + T ( x 2 e 2 ⃗ ) + ⋯ + T ( x m e m ⃗ ) A \vec{x} = T(x_1 \vec{e_1}) + T (x_2 \vec{e_2}) + \cdots + T (x_m \vec{e_m}) A x = T ( x 1 e 1 ) + T ( x 2 e 2 ) + ⋯ + T ( x m e m ) (property 2)
A x ⃗ = T ( x 1 e 1 ⃗ + x 2 e 2 ⃗ + ⋯ + x m e m ⃗ ) A \vec{x} = T(x_1 \vec{e_1} + x_2 \vec{e_2} + \cdots + x_m \vec{e_m}) A x = T ( x 1 e 1 + x 2 e 2 + ⋯ + x m e m ) (property 1)
A x ⃗ = T ( x ⃗ ) A \vec{x} = T(\vec{x}) A x = T ( x ) as x ⃗ = x 1 e 1 ⃗ + x 2 e 2 ⃗ + ⋯ + x m e m ⃗ \vec{x} = x_1 \vec{e_1} + x_2 \vec{e_2} + \cdots + x_m \vec{e_m} x = x 1 e 1 + x 2 e 2 + ⋯ + x m e m
Example
Sow the transformation T : R 2 → R 2 T : \mathbb{R}^2 \to \mathbb{R}^2 T : R 2 → R 2 is not linear, where T T T is given by:
y 1 = x 1 2 y_1 = x_1^2 y 1 = x 1 2
y 2 = x 1 + x 2 y_2 = x_1 + x_2 y 2 = x 1 + x 2
f [ x 1 x 2 ] = [ x 1 2 x 1 + x 2 ] f
\begin{bmatrix}
x_1 \\
x_2
\end{bmatrix}
=
\begin{bmatrix}
x_1^2 \\
x_1 + x_2
\end{bmatrix} f [ x 1 x 2 ] = [ x 1 2 x 1 + x 2 ]
f [ 1 1 ] = [ 1 2 1 + 1 ] = [ 1 2 ] f \begin{bmatrix} 1 \\ 1 \end{bmatrix} =
\begin{bmatrix} 1^2 \\ 1 + 1 \end{bmatrix} =
\begin{bmatrix} 1 \\ 2 \end{bmatrix} f [ 1 1 ] = [ 1 2 1 + 1 ] = [ 1 2 ]
f [ − 1 − 1 ] = [ ( − 1 ) 2 − 1 − 1 ] = [ 1 − 2 ] ≠ − [ 1 2 ] f \begin{bmatrix} -1 \\ -1 \end{bmatrix} = \begin{bmatrix} (-1)^2 \\ -1 -1 \end{bmatrix}
= \begin{bmatrix} 1 \\ -2 \end{bmatrix} \neq - \begin{bmatrix} 1 \\ 2 \end{bmatrix} f [ − 1 − 1 ] = [ ( − 1 ) 2 − 1 − 1 ] = [ 1 − 2 ] = − [ 1 2 ]
More generally:
T ( − [ 1 1 ] ) ≠ − T ( [ 1 1 ] ) T \left( -\begin{bmatrix} 1 \\ 1 \end{bmatrix} \right) \neq - T \left( \begin{bmatrix} 1 \\ 1 \end{bmatrix} \right) T ( − [ 1 1 ] ) = − T ( [ 1 1 ] )
This fails property 2. Therefore, this is not a linear transformation.
Example
Recall the function f : R 3 → R f : \mathbb{R}^3 \to \mathbb{R} f : R 3 → R given by f [ x 1 x 2 x 3 ] = x 1 2 + x 2 2 + x 3 2 f \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \sqrt{x_1^2 + x_2^2 + x_3^2} f ⎣ ⎡ x 1 x 2 x 3 ⎦ ⎤ = x 1 2 + x 2 2 + x 3 2 . Show that f f f is not a linear a transformation.
f [ − 1 0 0 ] = ( − 1 ) 2 + 0 + 0 = 1 f \begin{bmatrix} -1 \\ 0 \\ 0 \end{bmatrix} = \sqrt{\left( -1 \right) ^{2} + 0 + 0} = 1 f ⎣ ⎡ − 1 0 0 ⎦ ⎤ = ( − 1 ) 2 + 0 + 0 = 1
− 1 f [ 1 0 0 ] = − 1 1 + 0 + 0 = − 1 -1 f \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} = -1 \sqrt{1 + 0 + 0} =-1 − 1 f ⎣ ⎡ 1 0 0 ⎦ ⎤ = − 1 1 + 0 + 0 = − 1
f ( − e 1 ⃗ ) ≠ − f ( e 1 ⃗ ) f(-\vec{e_1}) \neq -f (\vec{e_1}) f ( − e 1 ) = − f ( e 1 ) (fails property 2)
or
f ( e 1 ⃗ ) = 1 f(\vec{e_1}) = 1 f ( e 1 ) = 1
f ( e 2 ⃗ ) = 1 f(\vec{e_2}) = 1 f ( e 2 ) = 1
f ( e 1 ⃗ + e 2 ⃗ ) = f [ 1 1 0 ] = 1 + 1 + 0 = 2 f(\vec{e_1} + \vec{e_2}) = f \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} = \sqrt{1 + 1 + 0} = \sqrt{2} f ( e 1 + e 2 ) = f ⎣ ⎡ 1 1 0 ⎦ ⎤ = 1 + 1 + 0 = 2
f ( e 1 ⃗ + e 2 ⃗ ) ≠ f ( e 1 ⃗ ) + f ( e 2 ⃗ ) f(\vec{e_1} + \vec{e_2}) \neq f(\vec{e_1}) + f(\vec{e_2}) f ( e 1 + e 2 ) = f ( e 1 ) + f ( e 2 ) (fails property 1)
2.2 Linear Transformations in Geometry
Suppose T : R 2 → R 2 T : \mathbb{R}^2 \to \mathbb{R}^2 T : R 2 → R 2 is a linear transformation. Geometrically, we will discuss:
Orthogonal projection
Reflection
Scaling
Rotation
Horizontal or vertical shear
Background material (Geometry) : See Appendix A in textbook
∣ ∣ v ⃗ ∣ ∣ \mid \mid \vec{v} \mid \mid ∣∣ v ∣∣ length (magnitude, norm) of v ⃗ \vec{v} v in R n \mathbb{R}^n R n
∣ ∣ v ⃗ ∣ ∣ = v ⃗ ∗ v ⃗ = v 1 2 + v 2 2 + ⋯ + v n 2 \mid \mid \vec{v} \mid \mid = \sqrt{\vec{v} * \vec{v}} = \sqrt{v_1^2 + v_2^2 + \cdots + v_n^2} ∣∣ v ∣∣= v ∗ v = v 1 2 + v 2 2 + ⋯ + v n 2
v ⃗ = [ v 1 v 2 ⋮ v n ] \vec{v} = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix} v = ⎣ ⎡ v 1 v 2 ⋮ v n ⎦ ⎤
If c c c is a scalar and v ⃗ ∈ R n , ∣ ∣ c v ⃗ ∣ ∣ = ∣ c ∣ ∣ ∣ v ⃗ ∣ ∣ \vec{v} \in \mathbb{R}^n,\ \mid \mid c \vec{v} \mid \mid = \mid c \mid \mid \mid \vec{v} \mid \mid v ∈ R n , ∣∣ c v ∣∣=∣ c ∣∣∣ v ∣∣ . Here ∣ c ∣ \mid c \mid ∣ c ∣ is absolute value of c c c .
A vector u ⃗ ∈ R n \vec{u} \in \mathbb{R}^n u ∈ R n is a unit vector provided.
∣ ∣ u ⃗ ∣ ∣ = 1 \mid \mid \vec{u} \mid \mid =1 ∣∣ u ∣∣= 1
Example: e 1 ⃗ , e 2 ⃗ , ⋯ , e n ⃗ \vec{e_1},\ \vec{e_2}, \cdots ,\ \vec{e_n} e 1 , e 2 , ⋯ , e n all unit
Two vectors v ⃗ , w ⃗ \vec{v},\ \vec{w} v , w in R n \mathbb{R}^n R n are orthogonal (perpendicular, normal) provided
v ⃗ ∗ w ⃗ = 0 \vec{v} * \vec{w} = 0 v ∗ w = 0 (angle between v ⃗ \vec{v} v and w ⃗ \vec{w} w is right)
Two nonzero vectors v ⃗ \vec{v} v , w ⃗ \vec{w} w in R n \mathbb{R}^n R n are parallel provided they are scaler multiples of each other
Example
Let v ⃗ = [ 6 − 2 − 1 ] \vec{v} = \begin{bmatrix} 6 \\ -2 \\ -1 \end{bmatrix} v = ⎣ ⎡ 6 − 2 − 1 ⎦ ⎤ and w ⃗ = [ 2 5 2 ] \vec{w} = \begin{bmatrix} 2 \\ 5 \\2 \end{bmatrix} w = ⎣ ⎡ 2 5 2 ⎦ ⎤
1) Show v ⃗ \vec{v} v and w ⃗ \vec{w} w are perpendicular
v ⃗ ⋅ w ⃗ = 6 ( 2 ) + ( − 2 ) ( 5 ) + ( − 1 ) ( 2 ) = 0 \vec{v} \cdot \vec{w} = 6(2) + (-2)(5) + (-1)(2) = 0 v ⋅ w = 6 ( 2 ) + ( − 2 ) ( 5 ) + ( − 1 ) ( 2 ) = 0
2) Find two unit vectors parallel to w ⃗ \vec{w} w
∣ ∣ w ⃗ ∣ ∣ = 2 2 + 5 2 + 2 2 = 4 + 25 + 4 = 33 \mid \mid \vec{w} \mid \mid = \sqrt{2^{2} + 5^{2} + 2^{2}} = \sqrt{4 + 25 + 4} = \sqrt{33} ∣∣ w ∣∣= 2 2 + 5 2 + 2 2 = 4 + 25 + 4 = 33
w ⃗ ∣ ∣ w ⃗ ∣ ∣ = 1 33 [ 2 5 2 ] \frac{\vec{w}}{ \mid \mid \vec{w} \mid \mid } = \frac{1}{\sqrt{33}} \begin{bmatrix} 2 \\ 5 \\ 2 \end{bmatrix} ∣∣ w ∣∣ w = 33 1 ⎣ ⎡ 2 5 2 ⎦ ⎤ (the length of unit vectors must be 1)
Sometimes this is called the normalization of w ⃗ \vec{w} w or the direction of w ⃗ \vec{w} w .
and − 1 33 [ 2 5 2 ] \frac{-1}{\sqrt{33}} \begin{bmatrix} 2 \\ 5 \\ 2 \end{bmatrix} 33 − 1 ⎣ ⎡ 2 5 2 ⎦ ⎤
Adding Vectors (triangle rule and parallelogram rule):
Properties of the Dot Product
Consider u ⃗ , v ⃗ , w ⃗ ∈ R n \vec{u}, \vec{v}, \vec{w} \in \mathbb{R}^{n} u , v , w ∈ R n and k k k scalar.
v ⃗ ⋅ w ⃗ = w ⃗ ⋅ v ⃗ \vec{v} \cdot \vec{w} = \vec{w} \cdot \vec{v} v ⋅ w = w ⋅ v
k ( v ⃗ ⋅ w ⃗ ) = ( k v ⃗ ) ⋅ w ⃗ = v ⃗ ⋅ ( k w ⃗ ) k\left( \vec{v} \cdot \vec{w} \right) = \left( k \vec{v} \right) \cdot \vec{w} = \vec{v} \cdot \left( k \vec{w} \right) k ( v ⋅ w ) = ( k v ) ⋅ w = v ⋅ ( k w )
u ⃗ ⋅ ( v ⃗ + w ⃗ ) = u ⃗ ⋅ v ⃗ + u ⃗ ⋅ w ⃗ \vec{u} \cdot \left( \vec{v} + \vec{w} \right) = \vec{u} \cdot \vec{v} + \vec{u} \cdot \vec{w} u ⋅ ( v + w ) = u ⋅ v + u ⋅ w
Orthogonal Projection onto a line L L L
Suppose L L L is a line in R n \mathbb{R}^{n} R n and w ⃗ \vec{w} w is a nonzero vector with L = space { w ⃗ } L = \text{space}\{\vec{w}\} L = space { w } .
span
means all multiples of w ⃗ \vec{w} w
Given x ⃗ \vec{x} x in R n \mathbb{R}^{n} R n , we may write x ⃗ = x ∥ ⃗ + x ⊥ ⃗ \vec{x} = \vec{x^{\parallel}} + \vec{x^{\bot}} x = x ∥ + x ⊥
x ⃗ ∥ = proj L x ⃗ \vec{x}^{\parallel} = \text{proj}_{L} \vec{x} x ∥ = proj L x :
This is the orthogonal projection of x ⃗ \vec{x} x onto L L L . Component of x ⃗ \vec{x} x parallel to L L L .
x ⃗ ⊥ = x ⃗ − x ⃗ ∥ \vec{x}^{\bot} = \vec{x} - \vec{x}^{\parallel} x ⊥ = x − x ∥ :
This is the component of x ⃗ \vec{x} x perpendicular to L L L
We want: x ⃗ ∥ = k w ⃗ \vec{x}^{\parallel} = k \vec{w} x ∥ = k w . Find k k k . We also want:
x ⃗ ⊥ ⋅ w ⃗ = 0 \vec{x}^{\bot} \cdot \vec{w} = 0 x ⊥ ⋅ w = 0
( x ⃗ − x ⃗ ∥ ) ⋅ w ⃗ = 0 \left( \vec{x} - \vec{x}^{\parallel} \right) \cdot \vec{w} = 0 ( x − x ∥ ) ⋅ w = 0
( x ⃗ − k w ⃗ ) ⋅ w ⃗ = 0 \left( \vec{x} - k \vec{w}\right) \cdot \vec{w} = 0 ( x − k w ) ⋅ w = 0
x ⃗ ⋅ w ⃗ − k ( w ⃗ ⋅ w ⃗ ) = 0 \vec{x} \cdot \vec{w} - k \left( \vec{w} \cdot \vec{w} \right) = 0 x ⋅ w − k ( w ⋅ w ) = 0
x ⃗ ⋅ w ⃗ = k ( w ⃗ ⋅ w ⃗ ) \vec{x} \cdot \vec{w} = k \left( \vec{w} \cdot \vec{w} \right) x ⋅ w = k ( w ⋅ w )
k = x ⃗ ⋅ w ⃗ w ⃗ ⋅ w ⃗ k = \frac{\vec{x} \cdot \vec{w}}{\vec{w} \cdot \vec{w}} k = w ⋅ w x ⋅ w
The definition of a projection onto a line:
proj L x ⃗ = x ⃗ ⋅ w ⃗ w ⃗ ⋅ w ⃗ w ⃗ \text{proj}_{L} \vec{x} = \frac{\vec{x} \cdot \vec{w}}{\vec{w} \cdot \vec{w}} \vec{w} proj L x = w ⋅ w x ⋅ w w
Example
Let L L L be the line in R 3 \mathbb{R}^{3} R 3 spanned by w ⃗ = [ 1 0 − 2 ] \vec{w} = \begin{bmatrix} 1 \\ 0 \\ -2 \end{bmatrix} w = ⎣ ⎡ 1 0 − 2 ⎦ ⎤ .
Find the orthogonal projection of x ⃗ = [ 2 1 − 1 ] \vec{x} = \begin{bmatrix} 2 \\ 1 \\ -1 \end{bmatrix} x = ⎣ ⎡ 2 1 − 1 ⎦ ⎤ onto L L L and decompose x ⃗ \vec{x} x into x ⃗ ∥ \vec{x}^{\parallel} x ∥ into x ⃗ ∥ + x ⃗ ⊥ \vec{x}^{\parallel} + \vec{x}^{\bot} x ∥ + x ⊥ .
x ⃗ ⋅ w ⃗ = 2 ( 1 ) + 0 + ( − 2 ) ( − 1 ) = 4 \vec{x} \cdot \vec{w} = 2(1) + 0 + (-2)(-1) = 4 x ⋅ w = 2 ( 1 ) + 0 + ( − 2 ) ( − 1 ) = 4
w ⃗ ⋅ w ⃗ = 1 ( 1 ) + 0 ( − 2 ) ( − 2 ) = 5 \vec{w} \cdot \vec{w} = 1(1) + 0(-2)(-2) = 5 w ⋅ w = 1 ( 1 ) + 0 ( − 2 ) ( − 2 ) = 5
x ⃗ ∥ = proj L x ⃗ = ( x ⃗ ⋅ w ⃗ w ⃗ ⋅ w ⃗ ) w ⃗ \vec{x}^{\parallel} = \text{proj}_{L} \vec{x} = \left( \frac{\vec{x} \cdot \vec{w}}{\vec{w} \cdot \vec{w}} \right) \vec{w} x ∥ = proj L x = ( w ⋅ w x ⋅ w ) w
x ⃗ ∥ = 4 5 [ 1 0 2 ] = [ 4 5 0 − 8 5 ] \vec{x}^{\parallel} = \frac{4}{5} \begin{bmatrix} 1 \\ 0 \\ 2 \end{bmatrix} = \begin{bmatrix} \frac{4}{5} \\ 0 \\ -\frac{8}{5} \end{bmatrix} x ∥ = 5 4 ⎣ ⎡ 1 0 2 ⎦ ⎤ = ⎣ ⎡ 5 4 0 − 5 8 ⎦ ⎤
x ⃗ ⊥ = x ⃗ − x ⃗ ∥ = [ 2 1 − 1 ] − [ 4 5 0 − 8 5 ] = [ 6 5 1 3 5 ] \vec{x}^{\bot} = \vec{x} - \vec{x}^{\parallel} = \begin{bmatrix} 2 \\ 1 \\ -1 \end{bmatrix} - \begin{bmatrix} \frac{4}{5} \\ 0 \\ -\frac{8}{5} \end{bmatrix} = \begin{bmatrix} \frac{6}{5} \\ 1 \\ \frac{3}{5} \end{bmatrix} x ⊥ = x − x ∥ = ⎣ ⎡ 2 1 − 1 ⎦ ⎤ − ⎣ ⎡ 5 4 0 − 5 8 ⎦ ⎤ = ⎣ ⎡ 5 6 1 5 3 ⎦ ⎤
Check:
x ⃗ ⊥ ⋅ w ⃗ = 0 = [ 6 5 1 3 5 ] ⋅ [ 1 0 − 2 ] = 6 5 − 6 5 = 0 \vec{x}^{\bot} \cdot \vec{w} = 0 = \begin{bmatrix} \frac{6}{5} \\ 1 \\ \frac{3}{5} \end{bmatrix} \cdot \begin{bmatrix} 1 \\ 0 \\ -2 \end{bmatrix} = \frac{6}{5} - \frac{6}{5} = 0 x ⊥ ⋅ w = 0 = ⎣ ⎡ 5 6 1 5 3 ⎦ ⎤ ⋅ ⎣ ⎡ 1 0 − 2 ⎦ ⎤ = 5 6 − 5 6 = 0
Linear transformations T : R 2 → R 2 T : \mathbb{R}^{2} \to \mathbb{R}^{2} T : R 2 → R 2 and geometry:
Suppose w ⃗ = [ w 1 w 2 ] \vec{w} = \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} w = [ w 1 w 2 ] is a nonzero vector in R n \mathbb{R}^{n} R n and L = span { w ⃗ } L = \text{span}\{\vec{w}\} L = span { w } .
For x ⃗ \vec{x} x in R 2 \mathbb{R}^{2} R 2 , the map x ⃗ → proj L ( x ⃗ ) \vec{x} \to \text{proj}_{L}\left( \vec{x} \right) x → proj L ( x ) is a linear transformation!
Let’s find the 2 × 2 2 \times 2 2 × 2 matrix of orthogonal projection.
proj L ( e ⃗ 1 ) = ( e ⃗ 1 ⋅ w ⃗ w ⃗ ⋅ w ⃗ ) w ⃗ = w 1 w 1 2 + w 2 2 [ w 1 w 2 ] \text{proj} _{L} \left( \vec{e} _{1} \right) = \left( \frac{\vec{e} _{1}\cdot \vec{w}}{\vec{w} \cdot \vec{w}} \right) \vec{w} = \frac{w _{1}}{w _{1}^{2} + w _{2}^{2}} \begin{bmatrix} w _1 \\ w _2 \end{bmatrix} proj L ( e 1 ) = ( w ⋅ w e 1 ⋅ w ) w = w 1 2 + w 2 2 w 1 [ w 1 w 2 ]
proj L ( e ⃗ 2 ) = ( e ⃗ 2 ⋅ w ⃗ w ⃗ ⋅ w ⃗ ) w ⃗ = w 2 w 1 2 + w 2 2 [ w 1 w 2 ] \text{proj} _{L} \left( \vec{e} _{2} \right) = \left( \frac{\vec{e} _{2}\cdot \vec{w}}{\vec{w} \cdot \vec{w}} \right) \vec{w} = \frac{w _{2}}{w _{1}^{2} + w _{2}^{2}} \begin{bmatrix} w _1 \\ w _2 \end{bmatrix} proj L ( e 2 ) = ( w ⋅ w e 2 ⋅ w ) w = w 1 2 + w 2 2 w 2 [ w 1 w 2 ]
Matrix: 1 w 1 2 + w 2 2 [ w 1 2 w 1 w 2 w 1 w 2 w 2 2 ] \frac{1}{w_1^{2} + w_2^{2}} \begin{bmatrix} w_1^{2} & w_1w_2 \\ w_1w_2 & w_2 ^{2} \end{bmatrix} w 1 2 + w 2 2 1 [ w 1 2 w 1 w 2 w 1 w 2 w 2 2 ]
Comment: if w = span { [ u 1 u 2 ] } w=\text{span} \{ \begin{bmatrix} u_1 \\ u_2 \end{bmatrix} \} w = span { [ u 1 u 2 ] } where [ u 1 u 2 ] \begin{bmatrix} u_{1} \\ u_2 \end{bmatrix} [ u 1 u 2 ] is unit. i.e. u 1 2 + u 2 2 = 1 u_1^{2} + u_2^{2} = 1 u 1 2 + u 2 2 = 1
Let’s verify T T T is a linear transformation. Let [ x 1 x 2 ] \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} [ x 1 x 2 ] . Show proj L x ⃗ = A x ⃗ \text{proj}_{L} \vec{x} = A \vec{x} proj L x = A x
1 w 1 2 + w 2 2 [ w 1 2 w 1 w 2 w 1 w 2 w 2 2 ] [ x 1 x 2 ] = 1 w 1 2 + w 2 2 [ w 1 2 x 1 + w 1 w 2 x 2 w 1 w 2 x 1 + w 2 2 x 2 ] \frac{1}{w_1^{2} + w_2^{2}} \begin{bmatrix} w_1^{2} & w_1w_2 \\ w_1w_2 & w_2 ^{2} \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = \frac{1}{w_1 ^{2} + w_2 ^{2}} \begin{bmatrix} w_1^{2}x_1 + w_1w_2x_2 \\ w_1w_2x_1 + w_2^{2}x_2 \end{bmatrix} w 1 2 + w 2 2 1 [ w 1 2 w 1 w 2 w 1 w 2 w 2 2 ] [ x 1 x 2 ] = w 1 2 + w 2 2 1 [ w 1 2 x 1 + w 1 w 2 x 2 w 1 w 2 x 1 + w 2 2 x 2 ]
= 1 w 1 2 + w 2 2 [ w 1 ( w 1 x 1 + w 2 x 2 ) w 2 ( w 1 x 1 + w 2 x 2 ) ] = w ⃗ ⋅ x ⃗ v ⃗ ⋅ w ⃗ [ w 1 w 2 ] = \frac{1}{w_1^{2} + w_2^{2}} \begin{bmatrix} w_1 \left( w_1x_1 + w_2x_2 \right) \\ w_2 \left( w_1x_1 + w_2x_2 \right) \end{bmatrix} = \frac{\vec{w} \cdot \vec{x}}{\vec{v} \cdot \vec{w}} \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} = w 1 2 + w 2 2 1 [ w 1 ( w 1 x 1 + w 2 x 2 ) w 2 ( w 1 x 1 + w 2 x 2 ) ] = v ⋅ w w ⋅ x [ w 1 w 2 ]
Example
Find the matrix of orthogonal projection onto the line spanned by w ⃗ = [ − 1 2 ] \vec{w} = \begin{bmatrix} -1 \\ 2 \end{bmatrix} w = [ − 1 2 ] .
1 ( − 1 ) 2 + 2 2 [ ( − 1 ) 2 − 2 − 2 2 2 ] = 1 5 [ 1 − 2 − 2 4 ] = [ 1 5 − 2 5 − 2 5 4 5 ] \frac{1}{\left( -1 \right) ^{2} + 2^{2}} \begin{bmatrix} \left( -1 \right) ^{2} & -2 \\ -2 & 2^{2} \end{bmatrix} = \frac{1}{5} \begin{bmatrix} 1 & -2 \\ -2 & 4 \end{bmatrix} = \begin{bmatrix} \frac{1}{5} & -\frac{2}{5} \\ -\frac{2}{5} & \frac{4}{5} \end{bmatrix} ( − 1 ) 2 + 2 2 1 [ ( − 1 ) 2 − 2 − 2 2 2 ] = 5 1 [ 1 − 2 − 2 4 ] = [ 5 1 − 5 2 − 5 2 5 4 ]
Example
Find the matrix of orthogonal projection onto the line y = x y=x y = x .
span { [ 1 1 ] } \text{span}\{ \begin{bmatrix} 1 \\ 1 \end{bmatrix} \} span { [ 1 1 ] }
1 1 2 + 1 2 [ 1 1 1 ⋅ 1 1 ⋅ 1 1 2 ] = [ 1 2 1 2 1 2 1 2 ] \frac{1}{1^{2} + 1^{2}} \begin{bmatrix} 1^{1} & 1\cdot 1 \\ 1\cdot 1 & 1^{2} \end{bmatrix} = \begin{bmatrix} \frac{1}{2} & \frac{1}{2} \\ \frac{1}{2} & \frac{1}{2} \end{bmatrix} 1 2 + 1 2 1 [ 1 1 1 ⋅ 1 1 ⋅ 1 1 2 ] = [ 2 1 2 1 2 1 2 1 ]
Reflection: Let L = span { w ⃗ } L = \text{span} \{ \vec{w} \} L = span { w } by a line in R 2 \mathbb{R} ^2 R 2 .
We use x ⃗ ⊥ = x ⃗ − proj L ( x ⃗ ) \vec{x}^{\bot} = \vec{x} - \text{proj}_L (\vec{x}) x ⊥ = x − proj L ( x )
ref L = proj L ( x ⃗ ) − x ⃗ ⊥ \text{ref} _{L} = \text{proj} _{L}\left( \vec{x} \right) - \vec{x}^{\bot} ref L = proj L ( x ) − x ⊥
= proj L ( x ⃗ ) − ( x ⃗ − proj L ( x ) ) = \text{proj} _{L} \left( \vec{x} \right) - \left( \vec{x} - \text{proj} _{L}\left( x \right) \right) = proj L ( x ) − ( x − proj L ( x ) )
= 2 proj L ( x ⃗ ) − x ⃗ = 2 \text{proj}_{L} \left( \vec{x} \right) - \vec{x} = 2 proj L ( x ) − x
The matrix of reflection about line L L L :
Two ways to compute:
1) Suppose L = span { [ u 1 u 2 ] } L = \text{span}\{ \begin{bmatrix} u_1 \\ u_2 \end{bmatrix} \} L = span { [ u 1 u 2 ] } , where u 1 2 + u 2 2 = 1 u_1 ^{2} + u_2 ^{2} = 1 u 1 2 + u 2 2 = 1
ref L ( x ⃗ ) = 2 proj L ( x ⃗ ) − x ⃗ → 2 [ u 1 2 u 1 u 2 u 1 u 2 u 2 2 ] − I 2 = [ 2 u 1 2 − I 2 u 1 u 2 2 u 1 u 2 2 u 2 2 − 1 ] \text{ref} _{L}\left( \vec{x} \right) = 2 \text{proj} _{L} \left( \vec{x} \right) - \vec{x} \to 2 \begin{bmatrix} u _1^{2} & u _1u _2 \\ u _1u _2 & u _2^{2} \end{bmatrix} - I _2 = \begin{bmatrix} 2u _1^{2}-I & 2u _1u _2 \\ 2u _1u _2 & 2u _2^{2} - 1 \end{bmatrix} ref L ( x ) = 2 proj L ( x ) − x → 2 [ u 1 2 u 1 u 2 u 1 u 2 u 2 2 ] − I 2 = [ 2 u 1 2 − I 2 u 1 u 2 2 u 1 u 2 2 u 2 2 − 1 ]
2) The matrix has the form [ a b b − a ] \begin{bmatrix} a & b \\ b & -a \end{bmatrix} [ a b b − a ] where a 2 + b 2 = 1 a^{2} + b^{2} = 1 a 2 + b 2 = 1 and [ a b ] = ref L ( e ⃗ 1 ) \begin{bmatrix} a \\ b \end{bmatrix} = \text{ref}_{L}\left( \vec{e}_1 \right) [ a b ] = ref L ( e 1 )
Example
Calculate the matrix [ 0 1 1 0 ] \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} [ 0 1 1 0 ] that yields reflection about the line y = x y=x y = x .
2 proj L ( x ⃗ ) − x ⃗ 2 \text{proj}_{L}\left( \vec{x} \right) - \vec{x} 2 proj L ( x ) − x
2 [ 1 2 1 2 1 2 1 2 ] − [ 1 0 0 1 ] = [ 1 − 1 1 1 1 − 1 ] = [ 0 1 1 0 ] 2 \begin{bmatrix} \frac{1}{2} & \frac{1}{2} \\ \frac{1}{2} & \frac{1}{2} \end{bmatrix} - \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1-1 & 1 \\ 1 & 1-1 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} 2 [ 2 1 2 1 2 1 2 1 ] − [ 1 0 0 1 ] = [ 1 − 1 1 1 1 − 1 ] = [ 0 1 1 0 ]
Example
Let L L L by the y y y -axis, i.e. L = span { [ 0 1 ] } L = \text{span}\{ \begin{bmatrix} 0 \\ 1 \end{bmatrix} \} L = span { [ 0 1 ] } .
Find ref L ( e ⃗ 1 ) \text{ref}_{L}\left( \vec{e}_1 \right) ref L ( e 1 ) and the matrix of reflection about the line L L L .
ref L ( e ⃗ 1 ) = [ a b ] \text{ref}_{L} \left( \vec{e}_1 \right) = \begin{bmatrix} a \\ b \end{bmatrix} ref L ( e 1 ) = [ a b ]
Matrix: [ a b b − a ] \begin{bmatrix} a & b \\ b & -a \end{bmatrix} [ a b b − a ]
ref L ( e ⃗ 1 ) = 2 proj L ( e ⃗ 1 ) − e ⃗ 1 \text{ref} _{L}\left( \vec{e} _{1} \right) = 2 \text{proj} _{L} \left( \vec{e} _1 \right) - \vec{e} _1 ref L ( e 1 ) = 2 proj L ( e 1 ) − e 1
= 2 ( e ⃗ 1 ⋅ e ⃗ 2 e ⃗ 2 ⋅ e ⃗ 2 ) e ⃗ 2 − e ⃗ 1 = 2 ( 0 1 ) e ⃗ 2 − e ⃗ 1 = [ − 1 0 ] = 2 \left( \frac{\vec{e}_1 \cdot \vec{e}_2}{\vec{e}_2 \cdot \vec{e}_2} \right) \vec{e}_2 - \vec{e}_1 = 2 \left( \frac{0}{1} \right) \vec{e}_2 - \vec{e}_1 = \begin{bmatrix} -1 \\ 0 \end{bmatrix} = 2 ( e 2 ⋅ e 2 e 1 ⋅ e 2 ) e 2 − e 1 = 2 ( 1 0 ) e 2 − e 1 = [ − 1 0 ]
A = [ − 1 0 0 1 ] A = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix} A = [ − 1 0 0 1 ]
Scaling
For k > 0 , T ( x ⃗ ) = k x ⃗ k > 0,\ T(\vec{x}) = k \vec{x} k > 0 , T ( x ) = k x .
[ k 0 0 k ] \begin{bmatrix}
k & 0 \\
0 & k
\end{bmatrix} [ k 0 0 k ]
k > 1 k > 1 k > 1 : Dilation
0 < k < 1 0 < k < 1 0 < k < 1 : Contraction
Question: Can we interpret the transformation T ( x ⃗ ) = [ 0 − 1 1 0 ] x ⃗ T(\vec{x}) = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \vec{x} T ( x ) = [ 0 1 − 1 0 ] x geometrically?
Answer: Rotation counterclockwise by π 2 \frac{\pi}{2} 2 π or 90 degrees.
Rotation
Counterclockwise by angle θ \theta θ .
T ( e ⃗ 1 ) = [ cos θ sin θ ] T\left( \vec{e}_1 \right) = \begin{bmatrix} \cos \theta \\ \sin \theta \end{bmatrix} T ( e 1 ) = [ cos θ sin θ ]
T ( e ⃗ 2 ) = [ cos ( θ + π 2 ) sin ( θ + π 2 ) ] = [ − sin θ cos θ ] T\left( \vec{e}_2 \right) = \begin{bmatrix} \cos \left( \theta + \frac{\pi}{2} \right) \\ \sin \left( \theta + \frac{\pi}{2} \right) \end{bmatrix} = \begin{bmatrix} -\sin \theta \\ \cos \theta \end{bmatrix} T ( e 2 ) = [ cos ( θ + 2 π ) sin ( θ + 2 π ) ] = [ − sin θ cos θ ]
∴ A = [ cos θ − sin θ sin θ cos θ ] \therefore A = \begin{bmatrix} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{bmatrix} ∴ A = [ cos θ sin θ − sin θ cos θ ]
Transformation
Matrix
Scaling (by k k k )
k I 2 = [ k 0 0 k ] kI_2 = \begin{bmatrix} k & 0 \\ 0 & k \end{bmatrix} k I 2 = [ k 0 0 k ]
Orthogonal projection onto line L L L
[ u 1 2 u 1 u 2 u 1 u 2 u 2 2 ] \begin{bmatrix} u_1^2 & u_1u_2 \\ u_1u_2 & u_2^2 \end{bmatrix} [ u 1 2 u 1 u 2 u 1 u 2 u 2 2 ] , where [ u 1 u 2 ] \begin{bmatrix} u_1 \\ u_2 \end{bmatrix} [ u 1 u 2 ] is a unit vector parallel to L L L
Reflection about a line
[ a b b − a ] \begin{bmatrix} a & b \\ b & -a \end{bmatrix} [ a b b − a ] , where a 2 + b 2 = 1 a^2 + b^2 = 1 a 2 + b 2 = 1
Rotation through angle θ \theta θ
[ cos θ − sin θ sin θ cos θ ] \begin{bmatrix} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{bmatrix} [ cos θ sin θ − sin θ cos θ ] or [ a − b b a ] \begin{bmatrix} a & -b \\ b & a \end{bmatrix} [ a b − b a ] , where a 2 + b 2 = 1 a^2 + b^2 = 1 a 2 + b 2 = 1
Rotation through angle θ \theta θ combined with scaling by r r r
[ a − b b a ] = r [ cos θ − sin θ sin θ cos θ ] \begin{bmatrix} a & -b \\ b & a \end{bmatrix} = r \begin{bmatrix} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{bmatrix} [ a b − b a ] = r [ cos θ sin θ − sin θ cos θ ]
Horizontal shear
[ 1 k 0 1 ] \begin{bmatrix} 1 & k \\ 0 & 1 \end{bmatrix} [ 1 0 k 1 ]
Vertical shear
[ 1 0 k 1 ] \begin{bmatrix} 1 & 0 \ k & 1 \end{bmatrix} [ 1 0 k 1 ]
2.3 Matrix Products 2.3 Matrix Products
Rotation combined with scaling . Suppose
T 1 R 2 → R 2 T_1 \mathbb{R}^2 \to \mathbb{R}^2 T 1 R 2 → R 2 gives rotation counter clockwise by angle θ \theta θ
T 2 R 2 → R 2 T_2 \mathbb{R}^2 \to \mathbb{R}^2 T 2 R 2 → R 2 Scales by k > 0 k > 0 k > 0
This is in the form T 2 ( T 1 ( x ⃗ ) ) T_2 (T_1(\vec{x})) T 2 ( T 1 ( x ))
T 2 T 1 : R 2 → R 2 function composition T_2 T_1 : \mathbb{R}^2 \to \mathbb{R}^2 \text{ function composition} T 2 T 1 : R 2 → R 2 function composition
( T 2 T 1 ) ( x ⃗ ) = k [ cos θ − sin θ sin θ cos θ ] x ⃗ (T_2 T_1)(\vec{x}) = k \begin{bmatrix} \cos \theta & - \sin \theta \\ \sin \theta & \cos \theta \end{bmatrix} \vec{x} ( T 2 T 1 ) ( x ) = k [ cos θ sin θ − sin θ cos θ ] x
What is the matrix?
[ k cos θ − k sin θ k sin θ k cos θ ] = [ k 0 0 k ] [ cos θ − sin θ sin θ cos θ ] \begin{bmatrix} k\cos \theta & -k \sin \theta \\ k \sin \theta & k \cos \theta \end{bmatrix}
= \begin{bmatrix} k & 0 \\ 0 & k \end{bmatrix}
\begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{bmatrix} [ k cos θ k sin θ − k sin θ k cos θ ] = [ k 0 0 k ] [ cos θ sin θ − sin θ cos θ ]
Composition of Transformations ↔ Matrix Product \text{Composition of Transformations} \leftrightarrow \text{Matrix Product} Composition of Transformations ↔ Matrix Product
The matrix product BA : Suppose B B B is an n × p n\times p n × p matrix and A A A is a p × m p \times m p × m matrix.
Size of B A BA B A : [ n × p ] [ p × m ] → n × m [n \times p] [p\times m] \to n\times m [ n × p ] [ p × m ] → n × m
Columns of the product B A BA B A : Suppose A = [ ∣ ∣ ∣ v ⃗ 1 v ⃗ 2 ⋯ v ⃗ m ∣ ∣ ∣ ] A = \begin{bmatrix} | & | & & | \\ \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_m \\ | & | & & | \end{bmatrix} A = ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v m ∣ ⎦ ⎤
B A = [ ∣ ∣ ∣ B v ⃗ 1 B v ⃗ 2 ⋯ B v ⃗ m ∣ ∣ ∣ ] BA =
\begin{bmatrix}
| & | & & | \\
B\vec{v}_1 & B\vec{v}_2 & \cdots & B\vec{v}_m \\
| & | & & | \\
\end{bmatrix} B A = ⎣ ⎡ ∣ B v 1 ∣ ∣ B v 2 ∣ ⋯ ∣ B v m ∣ ⎦ ⎤
Entries of B A BA B A are dot products.
(i, j) - entry of BA = [row i of B] * [Column j of A]
Example
[ 1 3 − 1 2 0 1 ] [ 1 3 2 0 0 − 1 ] = [ 7 4 2 5 ] \begin{bmatrix}
1 & 3 & -1 \\
2 & 0 & 1
\end{bmatrix}
\begin{bmatrix}
1 & 3 \\
2 & 0 \\
0 & -1
\end{bmatrix}
=
\begin{bmatrix}
7 & 4 \\
2 & 5
\end{bmatrix} [ 1 2 3 0 − 1 1 ] ⎣ ⎡ 1 2 0 3 0 − 1 ⎦ ⎤ = [ 7 2 4 5 ]
Rows of the product B A BA B A [ith row of BA] = [ith row of B] A
Example
[ 2 0 1 ] [ 1 3 2 0 0 − 1 ] = [ 2 5 ] \begin{bmatrix}
2 & 0 & 1
\end{bmatrix}
\begin{bmatrix}
1 & 3 \\
2 & 0 \\
0 & -1
\end{bmatrix}
=
\begin{bmatrix}
2 & 5
\end{bmatrix} [ 2 0 1 ] ⎣ ⎡ 1 2 0 3 0 − 1 ⎦ ⎤ = [ 2 5 ]
Example
Suppose A = [ 5 3 2 0 ] A = \begin{bmatrix} 5 & 3 & 2 & 0 \end{bmatrix} A = [ 5 3 2 0 ] and B = [ 1 − 1 2 − 3 ] B = \begin{bmatrix} 1 \\ -1 \\ 2 \\ -3 \end{bmatrix} B = ⎣ ⎡ 1 − 1 2 − 3 ⎦ ⎤ . Find A B AB A B and B A BA B A .
A B = 5 − 3 + 4 + 0 = [ 6 ] AB = 5 - 3 + 4 + 0 = \begin{bmatrix} 6 \end{bmatrix} A B = 5 − 3 + 4 + 0 = [ 6 ]
B A = [ 1 − 1 2 − 3 ] [ 5 3 2 0 ] = [ 5 3 2 0 − 5 − 3 − 2 0 10 6 4 0 − 15 − 9 − 6 0 ] BA = \begin{bmatrix} 1 \\ -1 \\ 2 \\ -3 \end{bmatrix}
\begin{bmatrix}
5 & 3 & 2 & 0
\end{bmatrix}
=
\begin{bmatrix}
5 & 3 & 2 & 0 \\
-5 & -3 & -2 & 0 \\
10 & 6 & 4 & 0 \\
-15 & -9 & -6 & 0
\end{bmatrix} B A = ⎣ ⎡ 1 − 1 2 − 3 ⎦ ⎤ [ 5 3 2 0 ] = ⎣ ⎡ 5 − 5 10 − 15 3 − 3 6 − 9 2 − 2 4 − 6 0 0 0 0 ⎦ ⎤
Notice by these examples that A B ≠ B A AB \neq BA A B = B A (they are not even the same size).
Example
Let A = [ 2 1 − 3 0 ] A = \begin{bmatrix} 2 & 1 \\ -3 & 0 \end{bmatrix} A = [ 2 − 3 1 0 ] , B = [ 1 0 1 0 ] B = \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix} B = [ 1 1 0 0 ] , and C = [ 0 1 − 1 0 ] C = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} C = [ 0 − 1 1 0 ] . Show that A ( B + C ) = A B + A C A(B+C) = AB + AC A ( B + C ) = A B + A C
[ 2 1 − 3 0 ] ( [ 1 0 1 0 ] + [ 0 1 − 1 0 ] ) = [ 2 1 − 3 0 ] [ 1 1 0 0 ] = [ 2 2 − 3 − 3 ] \begin{bmatrix}
2 & 1 \\
-3 & 0
\end{bmatrix}
\left(
\begin{bmatrix}
1 & 0 \\
1 & 0
\end{bmatrix}
+
\begin{bmatrix}
0 & 1 \\
-1 & 0
\end{bmatrix}
\right)
=
\begin{bmatrix}
2 & 1 \\
-3 & 0
\end{bmatrix}
\begin{bmatrix}
1 & 1 \\
0 & 0
\end{bmatrix}
=
\begin{bmatrix}
2 & 2 \\
-3 & -3
\end{bmatrix} [ 2 − 3 1 0 ] ( [ 1 1 0 0 ] + [ 0 − 1 1 0 ] ) = [ 2 − 3 1 0 ] [ 1 0 1 0 ] = [ 2 − 3 2 − 3 ]
Properties
A ( B + C ) = A B + A C A(B+C) = AB + AC A ( B + C ) = A B + A C and ( C + D ) A = C A + D A (C+D)A = CA + DA ( C + D ) A = C A + D A
I n A = A I m = A I_nA = AI_m = A I n A = A I m = A
K ( A B ) = ( K A ) B = A ( K B ) K(AB) = (KA)B = A(KB) K ( A B ) = ( K A ) B = A ( K B )
A ( B C ) = ( A B ) C A(BC) = (AB)C A ( BC ) = ( A B ) C
Be Careful!
A B ≠ B A AB \neq BA A B = B A generally even if they are the same size
If A B = A C AB = AC A B = A C , it does not generally follow that B = C B=C B = C
If A B = 0 AB=0 A B = 0 , it does not generally follow that A = 0 A=0 A = 0 or B = 0 B=0 B = 0
Example
[ 1 0 1 0 ] [ 4 1 1 1 ] = [ 4 1 4 1 ] \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 4 & 1 \\ 1 & 1 \end{bmatrix} =
\begin{bmatrix} 4 & 1 \\ 4 & 1 \end{bmatrix} [ 1 1 0 0 ] [ 4 1 1 1 ] = [ 4 4 1 1 ]
and
[ 1 0 1 0 ] [ 4 1 − 1 2 ] = [ 4 1 4 1 ] \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 4 & 1 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} 4 & 1 \\ 4 & 1 \end{bmatrix} [ 1 1 0 0 ] [ 4 − 1 1 2 ] = [ 4 4 1 1 ]
Example
[ 4 1 1 1 ] [ 1 0 1 0 ] = [ 5 0 2 0 ] \begin{bmatrix} 4 & 1 \\ 1 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 5 & 0 \\ 2 & 0 \end{bmatrix} [ 4 1 1 1 ] [ 1 1 0 0 ] = [ 5 2 0 0 ]
Example
[ 2 0 0 0 − 4 0 ] [ 0 0 1 6 ] = [ 0 0 0 0 0 0 ] \begin{bmatrix}
2 & 0 \\
0 & 0 \\
-4 & 0
\end{bmatrix}
\begin{bmatrix}
0 & 0 \\
1 & 6
\end{bmatrix}
=
\begin{bmatrix}
0 & 0 \\
0 & 0 \\
0 & 0
\end{bmatrix} ⎣ ⎡ 2 0 − 4 0 0 0 ⎦ ⎤ [ 0 1 0 6 ] = ⎣ ⎡ 0 0 0 0 0 0 ⎦ ⎤
Definition:
For matrices A A A and B B B , we say A A A and B B B commute provided A B = B A AB = BA A B = B A . Note that both A A A and B B B must be n × n n \times n n × n .
We see [ 1 0 1 0 ] \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix} [ 1 1 0 0 ] an [ 4 1 1 1 ] \begin{bmatrix} 4 & 1 \\ 1 & 1 \end{bmatrix} [ 4 1 1 1 ] do not commute.
I n I_n I n commutes with any n × n n \times n n × n matrix
Example
[ a b c d ] [ 1 0 1 0 ] = [ a + b 0 c + d 0 ] \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix} =
\begin{bmatrix} a + b & 0 \\ c+d & 0 \end{bmatrix} [ a c b d ] [ 1 1 0 0 ] = [ a + b c + d 0 0 ]
[ 1 0 1 0 ] [ a b c d ] = [ a b a b ] \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} a & b \\ c & d \end{bmatrix} =
\begin{bmatrix} a & b \\ a & b \end{bmatrix} [ 1 1 0 0 ] [ a c b d ] = [ a a b b ]
a + b = a a+b = a a + b = a
c + d = a c+d = a c + d = a
b = 0 b = 0 b = 0
b = 0 b=0 b = 0
[ c + d 0 c d ] \begin{bmatrix} c+d & 0 \\ c & d \end{bmatrix} [ c + d c 0 d ]
Example
Find all matrices that commute with [ 2 0 0 0 3 0 0 0 4 ] \begin{bmatrix} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 4 \end{bmatrix} ⎣ ⎡ 2 0 0 0 3 0 0 0 4 ⎦ ⎤
[ 2 0 0 0 3 0 0 0 4 ] [ a b c d e f g h i ] = [ 2 a 2 b 2 c 3 d 3 e 3 f 4 g 4 h 4 i ] \begin{bmatrix} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 4 \end{bmatrix} \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}
=
\begin{bmatrix}
2a & 2b & 2c \\
3d & 3e & 3f \\
4g & 4h & 4i
\end{bmatrix} ⎣ ⎡ 2 0 0 0 3 0 0 0 4 ⎦ ⎤ ⎣ ⎡ a d g b e h c f i ⎦ ⎤ = ⎣ ⎡ 2 a 3 d 4 g 2 b 3 e 4 h 2 c 3 f 4 i ⎦ ⎤
[ a b c d e f g h i ] [ 2 0 0 0 3 0 0 0 4 ] = [ 2 a 3 b 4 c 2 d 3 e 4 f 2 g 3 h 4 i ] \begin{bmatrix}
a & b & c \\
d & e & f \\
g & h & i
\end{bmatrix}
\begin{bmatrix}
2 & 0 & 0 \\
0 & 3 & 0 \\
0 & 0 & 4
\end{bmatrix}
=
\begin{bmatrix}
2a & 3b & 4c \\
2d & 3e & 4f \\
2g & 3h & 4i
\end{bmatrix} ⎣ ⎡ a d g b e h c f i ⎦ ⎤ ⎣ ⎡ 2 0 0 0 3 0 0 0 4 ⎦ ⎤ = ⎣ ⎡ 2 a 2 d 2 g 3 b 3 e 3 h 4 c 4 f 4 i ⎦ ⎤
2 b = 3 b 2b = 3b 2 b = 3 b
2 c = 4 c 2c = 4c 2 c = 4 c
3 d = 2 d 3d = 2d 3 d = 2 d
3 f = 4 f 3f = 4f 3 f = 4 f
4 g = 2 g 4g = 2g 4 g = 2 g
4 h = 3 h 4h = 3h 4 h = 3 h
[ a 0 0 0 e 0 0 0 i ] \begin{bmatrix}
a & 0 & 0 \\
0 & e & 0 \\
0 & 0 & i
\end{bmatrix} ⎣ ⎡ a 0 0 0 e 0 0 0 i ⎦ ⎤
Power of a Matrix
Suppose A A A is n × n n \times n n × n . For k ≥ 1 k \ge 1 k ≥ 1 integer, define the k k k th power of A A A .
A k = A A A A ⋯ A undefined k times A^k = \underbrace{AAAA \cdots A}_{k \text{ times}} A k = k times AAAA ⋯ A
Properties:
A p A q = A p + q A^pA^q = A^{p+q} A p A q = A p + q
( A p ) q = A p q \left( A^{p} \right)^{q} = A^{pq} ( A p ) q = A pq
Example
A = [ 0 1 2 0 0 − 1 0 0 0 ] A = \begin{bmatrix} 0 & 1 & 2 \\ 0 & 0 & -1 \\ 0 & 0 & 0 \end{bmatrix} A = ⎣ ⎡ 0 0 0 1 0 0 2 − 1 0 ⎦ ⎤ . Find A 2 A^{2} A 2 , A 3 A^{3} A 3 . What is A k A^{k} A k for k > 3 k > 3 k > 3 ?
A 2 = [ 0 1 2 0 0 − 1 0 0 0 ] [ 0 1 2 0 0 − 1 0 0 0 ] = [ 0 0 − 1 0 0 0 0 0 0 ] A^2 = \begin{bmatrix} 0 & 1 & 2 \\ 0 & 0 & -1 \\ 0 & 0 & 0 \end{bmatrix} \begin{bmatrix} 0 & 1 & 2 \\ 0 & 0 & -1 \\ 0 & 0 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 0 & -1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} A 2 = ⎣ ⎡ 0 0 0 1 0 0 2 − 1 0 ⎦ ⎤ ⎣ ⎡ 0 0 0 1 0 0 2 − 1 0 ⎦ ⎤ = ⎣ ⎡ 0 0 0 0 0 0 − 1 0 0 ⎦ ⎤
A 3 = [ 0 1 2 0 0 − 1 0 0 0 ] [ 0 0 − 1 0 0 0 0 0 0 ] = [ 0 0 0 0 0 0 0 0 0 ] A^3 = \begin{bmatrix} 0 & 1 & 2 \\ 0 & 0 & -1 \\ 0 & 0 & 0 \end{bmatrix}
\begin{bmatrix}
0 & 0 & -1 \\
0 & 0 & 0 \\
0 & 0 & 0
\end{bmatrix}
=
\begin{bmatrix}
0 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0
\end{bmatrix} A 3 = ⎣ ⎡ 0 0 0 1 0 0 2 − 1 0 ⎦ ⎤ ⎣ ⎡ 0 0 0 0 0 0 − 1 0 0 ⎦ ⎤ = ⎣ ⎡ 0 0 0 0 0 0 0 0 0 ⎦ ⎤
Note that A 3 = 0 A^3 = 0 A 3 = 0 , but A ≠ 0 A \neq 0 A = 0 .
rank ( A ) = 2 \text{rank}\left( A \right) = 2 rank ( A ) = 2
rank ( A 2 ) = 1 \text{rank}\left( A^{2} \right) = 1 rank ( A 2 ) = 1
rank ( A 3 ) = 0 \text{rank}\left( A^{3} \right) = 0 rank ( A 3 ) = 0
Example
[ a 0 0 0 b 0 0 0 c ] [ a 0 0 0 b 0 0 0 c ] = [ a 2 0 0 0 b 2 0 0 0 c 2 ] \begin{bmatrix}
a & 0 & 0 \\
0 & b & 0 \\
0 & 0 & c
\end{bmatrix}
\begin{bmatrix}
a & 0 & 0 \\
0 & b & 0 \\
0 & 0 & c
\end{bmatrix}
=
\begin{bmatrix}
a^2 & 0 & 0 \\
0 & b^2 & 0 \\
0 & 0 & c^2
\end{bmatrix} ⎣ ⎡ a 0 0 0 b 0 0 0 c ⎦ ⎤ ⎣ ⎡ a 0 0 0 b 0 0 0 c ⎦ ⎤ = ⎣ ⎡ a 2 0 0 0 b 2 0 0 0 c 2 ⎦ ⎤
[ a 0 0 0 b 0 0 0 c ] k = [ a k 0 0 0 b k 0 0 0 c k ] \begin{bmatrix}
a & 0 & 0\\
0 & b & 0 \\
0 & 0 & c
\end{bmatrix}^k
=
\begin{bmatrix}
a^k & 0 & 0\\
0 & b^k & 0 \\
0 & 0 & c^k
\end{bmatrix} ⎣ ⎡ a 0 0 0 b 0 0 0 c ⎦ ⎤ k = ⎣ ⎡ a k 0 0 0 b k 0 0 0 c k ⎦ ⎤
Exam 1
Will most likely have a “find all matrices that commute with” question
100 minutes
Practice Quiz 2
1) Compute the product A x ⃗ A \vec{x} A x using paper and pencil: [ 1 3 1 4 − 1 0 0 1 ] [ 1 − 2 ] \begin{bmatrix} 1 & 3 \\ 1 & 4 \\ -1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ -2 \end{bmatrix} ⎣ ⎡ 1 1 − 1 0 3 4 0 1 ⎦ ⎤ [ 1 − 2 ] .
1 [ 1 1 − 1 0 ] − 2 [ 3 4 0 1 ] = [ − 5 − 7 − 1 − 2 ] 1 \begin{bmatrix} 1 \\ 1 \\ -1 \\ 0 \end{bmatrix} - 2 \begin{bmatrix} 3 \\ 4 \\ 0 \\ 1 \end{bmatrix} = \begin{bmatrix} -5 \\ -7 \\ -1 \\ -2 \end{bmatrix} 1 ⎣ ⎡ 1 1 − 1 0 ⎦ ⎤ − 2 ⎣ ⎡ 3 4 0 1 ⎦ ⎤ = ⎣ ⎡ − 5 − 7 − 1 − 2 ⎦ ⎤
2) Let A A A be a 6 × 3 6 \times 3 6 × 3 matrix. We are told that A x ⃗ = 0 ⃗ A \vec{x} = \vec{0} A x = 0 has a unique solution.
a) What is the reduced row-echelon form of A A A ?
b) Can A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b be an inconsistent system for some b ⃗ ∈ R 6 \vec{b} \in \mathbb{R}^6 b ∈ R 6 ? Justify your answer .
c) Can A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b have infinitely many solutions for some b ⃗ ∈ R 6 \vec{b} \in \mathbb{R}^6 b ∈ R 6 ? Justify your answer .
Solution
a)
[ 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 ] \begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
0 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0
\end{bmatrix} ⎣ ⎡ 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 ⎦ ⎤
b) Yes; we can have [ 0 0 0 ∣ c ] \begin{bmatrix} 0 & 0 & 0 & \big| & c \end{bmatrix} [ 0 0 0 ∣ ∣ c ] where c ≠ 0 c\neq 0 c = 0 in ref [ a ∣ b ⃗ ] \text{ref}\begin{bmatrix} a & \big| & \vec{b} \end{bmatrix} ref [ a ∣ ∣ b ] .
c) No; there are no free variables
3) Let w ⃗ = [ − 2 2 0 1 ] \vec{w} = \begin{bmatrix} -2 \\ 2 \\ 0 \\ 1 \end{bmatrix} w = ⎣ ⎡ − 2 2 0 1 ⎦ ⎤ , L = span ( w ⃗ ) L = \text{span}\left( \vec{w} \right) L = span ( w ) , and x ⃗ = 3 e ⃗ 3 ∈ R 4 \vec{x} = 3 \vec{e}_3 \in \mathbb{R}^4 x = 3 e 3 ∈ R 4 . Show your work
a) Find x ⃗ ∥ = proj L ( x ⃗ ) \vec{x}^{\parallel} = \text{proj}_L \left( \vec{x} \right) x ∥ = proj L ( x ) , the projection of x ⃗ \vec{x} x onto L L L .
b) Find x ⃗ ⊥ \vec{x}^{\bot} x ⊥ , the component of x ⃗ \vec{x} x orthogonal to L L L .
Solution
a) proj L ( x ⃗ ) = ( x ⃗ ⋅ w ⃗ w ⃗ ⋅ w ⃗ ) w ⃗ \text{proj}_L \left( \vec{x} \right) = \left( \frac{\vec{x} \cdot \vec{w}}{\vec{w} \cdot \vec{w}} \right) \vec{w} proj L ( x ) = ( w ⋅ w x ⋅ w ) w
x ⃗ ⋅ w ⃗ = 0 + 6 + 0 + 0 = 6 \vec{x} \cdot \vec{w} = 0 + 6 + 0 + 0 = 6 x ⋅ w = 0 + 6 + 0 + 0 = 6
w ⃗ ⋅ w ⃗ = 4 + 4 + 0 + 1 = 9 \vec{w} \cdot \vec{w} = 4 + 4 + 0 + 1 = 9 w ⋅ w = 4 + 4 + 0 + 1 = 9
proj L ( x ⃗ ) = 2 3 [ − 2 2 0 1 ] = [ − 4 3 4 3 0 2 3 ] \text{proj}_{L} \left( \vec{x} \right) = \frac{2}{3} \begin{bmatrix} -2 \\ 2 \\ 0 \\ 1 \end{bmatrix} = \begin{bmatrix} -\frac{4}{3} \\ \frac{4}{3} \\ 0 \\ \frac{2}{3} \end{bmatrix} proj L ( x ) = 3 2 ⎣ ⎡ − 2 2 0 1 ⎦ ⎤ = ⎣ ⎡ − 3 4 3 4 0 3 2 ⎦ ⎤
b) x ⃗ ⊥ = x ⃗ − proj L ( x ⃗ ) \vec{x}^{\bot} = \vec{x} - \text{proj}_L \left( \vec{x} \right) x ⊥ = x − proj L ( x )
= [ 0 3 0 0 ] − [ − 4 3 4 3 0 2 3 ] = [ 4 3 5 3 0 − 2 3 ] = \begin{bmatrix} 0 \\ 3 \\ 0 \\ 0 \end{bmatrix} - \begin{bmatrix} -\frac{4}{3} \\ \frac{4}{3} \\ 0 \\ \frac{2}{3} \end{bmatrix} = \begin{bmatrix} \frac{4}{3} \\ \frac{5}{3} \\ 0 \\ -\frac{2}{3} \end{bmatrix} = ⎣ ⎡ 0 3 0 0 ⎦ ⎤ − ⎣ ⎡ − 3 4 3 4 0 3 2 ⎦ ⎤ = ⎣ ⎡ 3 4 3 5 0 − 3 2 ⎦ ⎤
4) Suppose T 1 : R 2 → R 3 T_1 : \mathbb{R}^{2} \to \mathbb{R}^{3} T 1 : R 2 → R 3 is given by T 1 ( [ x y ] ) = [ 0 x − y 3 y ] T_1 \left( \begin{bmatrix} x \\ y \end{bmatrix} \right) = \begin{bmatrix} 0 \\ x - y \\ 3y \end{bmatrix} T 1 ( [ x y ] ) = ⎣ ⎡ 0 x − y 3 y ⎦ ⎤ and T 2 : R 2 → R 2 T_2 : \mathbb{R}^{2} \to \mathbb{R}^{2} T 2 : R 2 → R 2 is a scaling transformation with T 2 ( [ 1 7 ] ) = [ 3 21 ] T_2 \left( \begin{bmatrix} 1 \\ 7 \end{bmatrix} \right) = \begin{bmatrix} 3 \\ 21 \end{bmatrix} T 2 ( [ 1 7 ] ) = [ 3 21 ] . Show your work
a) Find the matrix of the transformation T 1 T_1 T 1 .
b) Find the matrix of the transformation T 2 T_2 T 2 .
Solution
a) [ ∣ ∣ T ( e ⃗ 1 ) T ( e ⃗ 2 ) ∣ ∣ ] \begin{bmatrix} | & | \\ T\left( \vec{e}_1 \right) & T\left( \vec{e}_2 \right) \\ | & | \end{bmatrix} ⎣ ⎡ ∣ T ( e 1 ) ∣ ∣ T ( e 2 ) ∣ ⎦ ⎤
T [ 1 0 ] = [ 0 1 0 ] T \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} T [ 1 0 ] = ⎣ ⎡ 0 1 0 ⎦ ⎤ , T [ 0 1 ] = [ 0 − 1 3 ] T \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 0 \\ -1 \\ 3 \end{bmatrix} T [ 0 1 ] = ⎣ ⎡ 0 − 1 3 ⎦ ⎤
A = [ 0 0 1 − 1 0 3 ] A = \begin{bmatrix} 0 & 0 \\ 1 & -1 \\ 0 & 3 \end{bmatrix} A = ⎣ ⎡ 0 1 0 0 − 1 3 ⎦ ⎤
b) Scaling by k = 3 k=3 k = 3
[ 3 0 0 3 ] \begin{bmatrix} 3 & 0 \\ 0 & 3 \end{bmatrix} [ 3 0 0 3 ]
5) Let T : R 2 → R 3 T : \mathbb{R}^{2} \to \mathbb{R}^{3} T : R 2 → R 3 be a linear transformation such that T ( 2 e ⃗ 1 ) = [ 2 2 2 ] T \left( 2 \vec{e}_1 \right) = \begin{bmatrix} 2 \\ 2 \\ 2 \end{bmatrix} T ( 2 e 1 ) = ⎣ ⎡ 2 2 2 ⎦ ⎤ and T ( e ⃗ 1 + e ⃗ 2 ) = [ 2 3 4 ] T \left( \vec{e}_1 + \vec{e}_2 \right) = \begin{bmatrix} 2 \\ 3 \\ 4 \end{bmatrix} T ( e 1 + e 2 ) = ⎣ ⎡ 2 3 4 ⎦ ⎤ . Find T ( e ⃗ 1 ) T \left( \vec{e}_1 \right) T ( e 1 ) and T ( e ⃗ 2 ) T \left( \vec{e}_2 \right) T ( e 2 ) . Show your work .
T ( 2 e ⃗ 1 ) = 2 T ( e ⃗ 1 ) = [ 2 2 2 ] T \left( 2 \vec{e}_1 \right) = 2 T \left( \vec{e}_1 \right) = \begin{bmatrix} 2 \\ 2 \\ 2 \end{bmatrix} T ( 2 e 1 ) = 2 T ( e 1 ) = ⎣ ⎡ 2 2 2 ⎦ ⎤
T ( e ⃗ 1 ) = [ 1 1 1 ] T \left( \vec{e}_1 \right) = \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} T ( e 1 ) = ⎣ ⎡ 1 1 1 ⎦ ⎤
T ( e ⃗ 1 + e ⃗ 2 ) = T ( e ⃗ 1 ) + T ( e ⃗ 2 ) = [ 2 3 4 ] T \left( \vec{e}_1 + \vec{e}_2 \right) = T \left( \vec{e}_1 \right) + T \left( \vec{e}_2 \right) = \begin{bmatrix} 2 \\ 3 \\ 4 \end{bmatrix} T ( e 1 + e 2 ) = T ( e 1 ) + T ( e 2 ) = ⎣ ⎡ 2 3 4 ⎦ ⎤
T ( e ⃗ 2 ) = [ 2 3 4 ] − T ( e ⃗ 1 ) = [ 1 2 3 ] T \left( \vec{e}_2 \right) = \begin{bmatrix} 2 \\ 3 \\ 4 \end{bmatrix} - T \left( \vec{e}_1 \right) = \begin{bmatrix} 1 \\ 2 \\3 \end{bmatrix} T ( e 2 ) = ⎣ ⎡ 2 3 4 ⎦ ⎤ − T ( e 1 ) = ⎣ ⎡ 1 2 3 ⎦ ⎤
2.4 Inverse of a Linear Transformation
In Math1365 (or other courses), you see diagrams for f : X → Y f : X \to Y f : X → Y function.
Definition:
We say the function f : X → Y f : X \to Y f : X → Y is invertible provided for each y y y in Y Y Y , there is a unique x x x in X X X with f ( x ) = y f(x) = y f ( x ) = y if any only if f − 1 : Y → X f^{-1} : Y \to X f − 1 : Y → X is a function f − 1 ( y ) = x f^{-1}(y) = x f − 1 ( y ) = x provided f ( x ) = y f(x) = y f ( x ) = y .
Same notation for linear transformation T : R n → R n T : \mathbb{R}^{n} \to \mathbb{R}^{n} T : R n → R n
A square n × n n \times n n × n matrix A A A is invertible provided the map T ( x ⃗ ) = A x ⃗ T \left( \vec{x} \right) = A \vec{x} T ( x ) = A x is invertible. The matrix for T − 1 T^{-1} T − 1 is denoted A − 1 A^{-1} A − 1 .
Note:
T T − 1 ( y ⃗ ) = y ⃗ T T^{-1} (\vec{y}) = \vec{y} T T − 1 ( y ) = y for any y ⃗ \vec{y} y in R n \mathbb{R}^{n} R n
T − 1 T ( x ⃗ ) = x ⃗ T^{-1}T(\vec{x}) = \vec{x} T − 1 T ( x ) = x for any x ⃗ \vec{x} x in R n \mathbb{R}^{n} R n
A A − 1 = I n AA^{-1} = I_{n} A A − 1 = I n and A − 1 A = I n A^{-1}A = I_{n} A − 1 A = I n
A A A invertible means A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b has a unique solution for every b ⃗ \vec{b} b in R n \mathbb{R}^{n} R n .
The unique solution is x ⃗ = A − 1 b ⃗ \vec{x} = A^{-1}\vec{b} x = A − 1 b
For our discussion of rank: A A A is invertible is equivalent to…
rank ( A ) = n \text{rank}(A) = n rank ( A ) = n
rref ( A ) = I n \text{rref}(A) = I_n rref ( A ) = I n
The only solution to A x ⃗ = 0 ⃗ A\vec{x} = \vec{0} A x = 0 is x ⃗ = 0 ⃗ \vec{x} = \vec{0} x = 0
How to find A − 1 A^{-1} A − 1 if A A A is n × n n \times n n × n ,
Form the n × ( 2 n ) n \times \left( 2n \right) n × ( 2 n ) matrix [ A ∣ I ] \begin{bmatrix} A & \big| & I \end{bmatrix} [ A ∣ ∣ I ]
Perform elementary row operations to find rref [ A ∣ I ] \text{rref} \begin{bmatrix} A & \big| & I \end{bmatrix} rref [ A ∣ ∣ I ]
Then,
If rref [ A ∣ I ] = [ I ∣ B ] \text{rref} \begin{bmatrix} A & \big| & I \end{bmatrix} = \begin{bmatrix} I & \big| & B\end{bmatrix} rref [ A ∣ ∣ I ] = [ I ∣ ∣ B ] then B = A − 1 B = A^{-1} B = A − 1 .
If rref [ A ∣ I ] \text{rref} \begin{bmatrix} A & \big| & I \end{bmatrix} rref [ A ∣ ∣ I ] is not of this form then A A A is not invertible.
Example
A = [ 2 3 1 1 ] A = \begin{bmatrix} 2 & 3 \\ 1 & 1 \end{bmatrix} A = [ 2 1 3 1 ] . Find A − 1 A^{-1} A − 1 .
[ 2 3 ∣ 1 0 1 1 ∣ 0 1 ] → [ 1 1 ∣ 0 1 2 3 ∣ 1 0 ] → \begin{bmatrix} 2 & 3 & \big| & 1 & 0 \\ 1 & 1 & \big| & 0 & 1 \end{bmatrix}
\to
\begin{bmatrix} 1 & 1 & \big| & 0 & 1 \\ 2 & 3 & \big| & 1 & 0 \end{bmatrix}
\to [ 2 1 3 1 ∣ ∣ ∣ ∣ 1 0 0 1 ] → [ 1 2 1 3 ∣ ∣ ∣ ∣ 0 1 1 0 ] →
[ 1 1 ∣ 0 1 0 1 ∣ 1 − 2 ] → [ 1 0 ∣ − 1 3 0 1 ∣ 1 − 2 ] \begin{bmatrix} 1 & 1 & \big| & 0 & 1 \\ 0 & 1 \big| & 1 & -2 \end{bmatrix}
\to
\begin{bmatrix} 1 & 0 & \big| & -1 & 3 \\ 0 & 1 & \big| & 1 & -2 \end{bmatrix} [ 1 0 1 1 ∣ ∣ ∣ ∣ 1 0 − 2 1 ] → [ 1 0 0 1 ∣ ∣ ∣ ∣ − 1 1 3 − 2 ]
A − 1 = [ − 1 3 1 − 2 ] A^{-1} = \begin{bmatrix} -1 & 3 \\ 1 & -2 \end{bmatrix} A − 1 = [ − 1 1 3 − 2 ]
Example
A = [ 2 2 1 1 ] A = \begin{bmatrix} 2 & 2 \ 1 & 1 \end{bmatrix} A = [ 2 2 1 1 ] . Find A − 1 A^{-1} A − 1 .
[ 2 2 ∣ 1 0 ] → [ 1 1 ∣ 0 1 ] → [ 1 1 ∣ 0 1 0 0 ∣ 1 − 2 ] \begin{bmatrix} 2 & 2 & \big| & 1 & 0 \end{bmatrix} \to
\begin{bmatrix} 1 & 1 & \big| & 0 & 1 \end{bmatrix} \to
\begin{bmatrix} 1 & 1 & \big| & 0 & 1 \\ 0 & 0 & \big| & 1 & -2 \end{bmatrix} [ 2 2 ∣ ∣ 1 0 ] → [ 1 1 ∣ ∣ 0 1 ] → [ 1 0 1 0 ∣ ∣ ∣ ∣ 0 1 1 − 2 ]
A A A is not invertible
Example
A = [ 1 3 1 1 4 1 2 0 1 ] A = \begin{bmatrix} 1 & 3 & 1 \\ 1 & 4 & 1 \\ 2 & 0 & 1 \end{bmatrix} A = ⎣ ⎡ 1 1 2 3 4 0 1 1 1 ⎦ ⎤ . Find A − 1 A^{-1} A − 1 .
[ 2 2 ∣ 1 0 1 1 ∣ 0 1 ] → [ 1 3 1 ∣ 1 0 0 0 1 0 ∣ − 1 1 0 0 − 6 − 1 ∣ − 2 0 1 ] \begin{bmatrix}
2 & 2 & \big| & 1 & 0 \\
1 & 1 & \big| & 0 & 1 \\
\end{bmatrix}
\to
\begin{bmatrix}
1 & 3 & 1 & \big| & 1 & 0 & 0 \\
0 & 1 & 0 & \big| & -1 & 1 & 0 \\
0 & -6 & -1 & \big| & -2 & 0 & 1
\end{bmatrix} [ 2 1 2 1 ∣ ∣ ∣ ∣ 1 0 0 1 ] → ⎣ ⎡ 1 0 0 3 1 − 6 1 0 − 1 ∣ ∣ ∣ ∣ ∣ ∣ 1 − 1 − 2 0 1 0 0 0 1 ⎦ ⎤
→ [ 1 3 1 ∣ 1 0 0 0 1 0 ∣ − 1 1 0 0 0 − 1 ∣ − 8 6 1 ] \to
\begin{bmatrix}
1 & 3 & 1 & \big| & 1 & 0 & 0 \\
0 & 1 & 0 & \big| & -1 & 1 & 0 \\
0 & 0 & -1 & \big| & -8 & 6 & 1
\end{bmatrix} → ⎣ ⎡ 1 0 0 3 1 0 1 0 − 1 ∣ ∣ ∣ ∣ ∣ ∣ 1 − 1 − 8 0 1 6 0 0 1 ⎦ ⎤
→ [ 1 3 1 ∣ 1 0 0 0 1 0 ∣ − 1 1 0 0 0 1 ∣ 8 − 6 − 1 ] → [ 1 3 0 ∣ − 7 6 1 0 1 0 ∣ − 1 1 0 0 0 1 ∣ 8 − 6 − 1 ] \to
\begin{bmatrix}
1 & 3 & 1 & \big| & 1 & 0 & 0 \\
0 & 1 & 0 & \big| & -1 & 1 & 0 \\
0 & 0 & 1 & \big| & 8 & -6 & -1
\end{bmatrix}
\to
\begin{bmatrix}
1 & 3 & 0 & \big| & -7 & 6 & 1\\
0 & 1 & 0 & \big| & -1 & 1 & 0 \\
0 & 0 & 1 & \big| & 8 & -6 & -1
\end{bmatrix} → ⎣ ⎡ 1 0 0 3 1 0 1 0 1 ∣ ∣ ∣ ∣ ∣ ∣ 1 − 1 8 0 1 − 6 0 0 − 1 ⎦ ⎤ → ⎣ ⎡ 1 0 0 3 1 0 0 0 1 ∣ ∣ ∣ ∣ ∣ ∣ − 7 − 1 8 6 1 − 6 1 0 − 1 ⎦ ⎤
→ [ 1 0 0 ∣ − 4 3 1 0 1 0 ∣ − 1 1 0 0 0 1 ∣ 8 − 6 − 1 ] \to
\begin{bmatrix}
1 & 0 & 0 & \big| & -4 & 3 & 1 \\
0 & 1 & 0 & \big| & -1 & 1 & 0 \\
0 & 0 & 1 & \big| & 8 & -6 & -1
\end{bmatrix} → ⎣ ⎡ 1 0 0 0 1 0 0 0 1 ∣ ∣ ∣ ∣ ∣ ∣ − 4 − 1 8 3 1 − 6 1 0 − 1 ⎦ ⎤
A − 1 = [ − 4 3 1 − 1 1 0 8 − 6 − 1 ] A^{-1} = \begin{bmatrix} -4 & 3 & 1 \\ -1 & 1 & 0 \\ 8 & -6 & -1 \end{bmatrix} A − 1 = ⎣ ⎡ − 4 − 1 8 3 1 − 6 1 0 − 1 ⎦ ⎤
Example
Find all solutions to the system A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b where A = [ 1 3 1 1 4 1 2 0 1 ] A = \begin{bmatrix} 1 & 3 & 1 \\ 1 & 4 & 1 \\ 2 & 0 & 1 \end{bmatrix} A = ⎣ ⎡ 1 1 2 3 4 0 1 1 1 ⎦ ⎤ and b ⃗ = [ 1 − 1 0 ] \vec{b} = \begin{bmatrix} 1 \\ -1 \\ 0 \end{bmatrix} b = ⎣ ⎡ 1 − 1 0 ⎦ ⎤
A − 1 = [ − 4 3 1 − 1 1 0 8 − 6 − 1 ] A^{-1} = \begin{bmatrix} -4 & 3 & 1 \\ -1 & 1 & 0 \\ 8 & -6 & -1 \end{bmatrix} A − 1 = ⎣ ⎡ − 4 − 1 8 3 1 − 6 1 0 − 1 ⎦ ⎤
x ⃗ = A − 1 b ⃗ = [ − 4 3 1 − 1 1 0 8 − 6 − 1 ] [ 1 − 1 0 ] = [ − 7 − 2 14 ] \vec{x} = A^{-1}\vec{b} = \begin{bmatrix} -4 & 3 & 1 \\ -1 & 1 & 0 \\ 8 & -6 & -1 \end{bmatrix}
\begin{bmatrix} 1 \\ -1 \\ 0 \end{bmatrix}
=
\begin{bmatrix} -7 \\ -2 \\ 14 \end{bmatrix} x = A − 1 b = ⎣ ⎡ − 4 − 1 8 3 1 − 6 1 0 − 1 ⎦ ⎤ ⎣ ⎡ 1 − 1 0 ⎦ ⎤ = ⎣ ⎡ − 7 − 2 14 ⎦ ⎤
Theorem:
Let A A A , B B B be n × n n \times n n × n matrices with B A = I n BA = I_n B A = I n then,
A A A , B B B are both invertible
A − 1 = B A^{-1} = B A − 1 = B and B − 1 = A B^{-1} = A B − 1 = A
A B = I n AB = I_n A B = I n
Proof of 1) Assume A A A , B B B are n × n n\times n n × n matrices with B A = I n BA = I_n B A = I n . Suppose A x ⃗ = 0 ⃗ A\vec{x} = \vec{0} A x = 0 . Show x ⃗ = 0 \vec{x}=0 x = 0 . Multiply by B B B : B A x ⃗ = B 0 ⃗ BA\vec{x} = B\vec{0} B A x = B 0 rewriting I x ⃗ = 0 ⃗ I\vec{x} = \vec{0} I x = 0 meaning x ⃗ = 0 ⃗ \vec{x} = \vec{0} x = 0 . Thus, A A A is invertible. Then, B A A − 1 = I A − 1 BA A^{-1} = IA^{-1} B A A − 1 = I A − 1 and B = A − 1 B = A^{-1} B = A − 1 . B B B is invertible.
Using the theorem:
If A A A , B B B are n × n n\times n n × n invertible matrices then so is B A BA B A and ( B A ) − 1 = A − 1 B − 1 \left( BA \right) ^{-1} = A^{-1}B^{-1} ( B A ) − 1 = A − 1 B − 1 .
Proof: ( B A ) ( A − 1 B − 1 ) = B ( A A − 1 ) B − 1 = B I B − 1 = B B − 1 = I \left( BA \right) \left( A^{-1}B^{-1} \right) = B\left( A A^{-1} \right) B^{-1} = BIB^{-1} = B B^{-1} = I ( B A ) ( A − 1 B − 1 ) = B ( A A − 1 ) B − 1 = B I B − 1 = B B − 1 = I .
Exercise : Suppose A A A is an n × n n\times n n × n invertible matrix.
Is A 2 A^{2} A 2 invertible? If so, what is ( A − 2 ) − 1 \left( A^{-2} \right) ^{-1} ( A − 2 ) − 1 ?
Yes; A − 1 A − 1 = ( A − 1 ) 2 A^{-1}A^{-1} = \left( A^{-1} \right) ^{2} A − 1 A − 1 = ( A − 1 ) 2
Is A 3 A^{3} A 3 invertible? If so, what is ( A 3 ) − 1 \left( A^{3} \right)^{-1} ( A 3 ) − 1 ?
Yes; ( A − 1 ) 3 \left( A^{-1} \right) ^{3} ( A − 1 ) 3
( A A A ) ( A − 1 A − 1 A − 1 ) = A A A − 1 A − 1 = A A − 1 = I \left( A AA \right) \left( A^{-1}A^{-1}A^{-1} \right) = A A A^{-1}A^{-1} = A A^{-1} = I ( AAA ) ( A − 1 A − 1 A − 1 ) = AA A − 1 A − 1 = A A − 1 = I
Back to 2 × 2 2\times 2 2 × 2 matrices: We saw
For A = [ 2 3 1 1 ] A = \begin{bmatrix} 2 & 3 \\ 1 & 1 \end{bmatrix} A = [ 2 1 3 1 ] , A − 1 = [ − 1 3 1 − 2 ] A^{-1} = \begin{bmatrix} -1 & 3 \\ 1 & -2 \end{bmatrix} A − 1 = [ − 1 1 3 − 2 ] .
The matrix [ 2 2 1 1 ] \begin{bmatrix} 2 & 2 \\ 1 & 1 \end{bmatrix} [ 2 1 2 1 ] is not invertible
Theorem : Consider a 2 × 2 2\times 2 2 × 2 matrix A = [ a b c d ] A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} A = [ a c b d ] .
A A A is invertible if and only if a d − b c ≠ 0 ad - bc \neq 0 a d − b c = 0
If A A A is invertible, then A − 1 A^{-1} A − 1 = 1 a d − b c [ d − b − c a ] \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} a d − b c 1 [ d − c − b a ]
The number a d − b c ad - bc a d − b c is a determinant of A = [ a b c d ] A = \begin{bmatrix} a & b \\ c& d \end{bmatrix} A = [ a c b d ] .
Example
A = [ 4 7 0 1 ] A = \begin{bmatrix} 4 & 7 \\ 0 & 1 \end{bmatrix} A = [ 4 0 7 1 ] . Find det ( A ) \text{det}(A) det ( A ) and A − 1 A^{-1} A − 1 .
det ( A ) = 4 − 0 = 4 \text{det}(A) = 4 - 0 = 4 det ( A ) = 4 − 0 = 4
A − 1 = 1 4 [ 1 − 7 0 4 ] A^{-1} = \frac{1}{4} \begin{bmatrix} 1 & -7 \\ 0 & 4 \end{bmatrix} A − 1 = 4 1 [ 1 0 − 7 4 ]
3.1 Image and Kernel of a Linear Transformation
Definition:
Let T : R m → R n T : \mathbb{R}^{m} \to \mathbb{R}^{n} T : R m → R n be a linear transformation.
The Image of T T T , denoted im ( T ) \text{im}\left( T \right) im ( T ) : im ( T ) = { T ( x ⃗ ) : x ∈ R m } ⊆ R n \text{im}\left( T \right) = \{T \left( \vec{x} \right) : x \in \mathbb{R}^{m} \} \subseteq \mathbb{R}^{n} im ( T ) = { T ( x ) : x ∈ R m } ⊆ R n
The kernel of T T T ker ( T ) \text{ker}\left( T \right) ker ( T ) : ker ( T ) = { x ⃗ ∈ R m : T ( x ⃗ ) = 0 ⃗ } ⊆ R m \text{ker}\left( T \right) = \{ \vec{x} \in \mathbb{R}^{m} : T \left( \vec{x} \right) = \vec{0} \} \subseteq \mathbb{R}^{m} ker ( T ) = { x ∈ R m : T ( x ) = 0 } ⊆ R m
Example
What is ker ( T ) \text{ker} \left( T \right) ker ( T ) and im ( T ) \text{im}\left( T \right) im ( T ) when T : R 2 → R 2 T : \mathbb{R}^{2} \to \mathbb{R}^{2} T : R 2 → R 2 is
1) Projection onto the line y = − x y = -x y = − x .
2) Reflection about the line y = − x y = -x y = − x .
Solution
1)
w ⃗ = [ − 1 1 ] \vec{w} = \begin{bmatrix} -1 \\ 1 \end{bmatrix} w = [ − 1 1 ]
L = span ( [ − 1 1 ] ) L = \text{span}\left( \begin{bmatrix} -1 \\ 1 \end{bmatrix} \right) L = span ( [ − 1 1 ] )
proj L ( x ⃗ ) = ( w ⃗ ⋅ w ⃗ w ⃗ ⋅ w ⃗ ) w ⃗ \text{proj}_{L} \left( \vec{x} \right) = \left( \frac{\vec{w} \cdot \vec{w}}{\vec{w} \cdot \vec{w}} \right) \vec{w} proj L ( x ) = ( w ⋅ w w ⋅ w ) w
x ⃗ \vec{x} x is in ker ( T ) \text{ker}\left( T \right) ker ( T ) provided x ⃗ ⋅ [ − 1 1 ] = 0 ⃗ \vec{x} \cdot \begin{bmatrix} -1 \\ 1 \end{bmatrix} = \vec{0} x ⋅ [ − 1 1 ] = 0
ker ( T ) = { [ x 1 x 2 ] : − x 1 + x 2 = 0 } \text{ker}\left( T \right) = \{ \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} : -x_1 + x_2 = 0 \} ker ( T ) = { [ x 1 x 2 ] : − x 1 + x 2 = 0 }
im ( T ) = L \text{im}\left( T \right) = L im ( T ) = L
2) ker ( T ) = { 0 ⃗ } \text{ker}\left( T \right) = \{ \vec{0} \} ker ( T ) = { 0 }
im ( T ) = R 2 \text{im}\left( T \right) = \mathbb{R}^{2} im ( T ) = R 2
Suppose T : R m → R n T : \mathbb{R}^{m} \to \mathbb{R}^{n} T : R m → R n is a linear transformation. There is an n × m n \times m n × m matrix A = [ ∣ ∣ ∣ a ⃗ 1 a ⃗ 2 ⋯ a ⃗ m ∣ ∣ ∣ ] A = \begin{bmatrix} | & | & & | \\ \vec{a}_1 & \vec{a}_2 & \cdots & \vec{a}_m \\ | & | & & | \end{bmatrix} A = ⎣ ⎡ ∣ a 1 ∣ ∣ a 2 ∣ ⋯ ∣ a m ∣ ⎦ ⎤ such that T ( x ⃗ ) = A x ⃗ T \left( \vec{x} \right) = A \vec{x} T ( x ) = A x for all x ⃗ \vec{x} x in R m \mathbb{R}^{m} R m .
Image of T T T (Also written im ( A ) \text{im}\left( A \right) im ( A ) ):
im ( T ) = { A x ⃗ : x ⃗ ∈ R m = { x 1 a ⃗ 1 + x 2 a ⃗ 2 + ⋯ + x m a ⃗ m : x i ∈ R = { all linear combinations of a ⃗ 1 , a ⃗ 2 , ⋯ , a ⃗ m } = span ( a ⃗ 1 , a ⃗ 2 , ⋯ , a ⃗ m ) \text{im}\left( T \right) = \{ A\vec{x} : \vec{x} \in \mathbb{R}^{m} = \{ x_1\vec{a}_1 + x_2\vec{a}_2 + \cdots + x_m\vec{a}_m : x_i \in \mathbb{R} = \{ \text{all linear combinations of } \vec{a}_1,\ \vec{a}_2,\ \cdots ,\ \vec{a}_m \} = \text{span}\left( \vec{a}_1,\ \vec{a}_2,\ \cdots, \vec{a}_m \right) im ( T ) = { A x : x ∈ R m = { x 1 a 1 + x 2 a 2 + ⋯ + x m a m : x i ∈ R = { all linear combinations of a 1 , a 2 , ⋯ , a m } = span ( a 1 , a 2 , ⋯ , a m )
Kernel of T T T (Also written ker ( A ) \text{ker}\left( A \right) ker ( A ) :
ker ( T ) = { x ∈ R m : A x ⃗ = 0 ⃗ } = { all solutions to A x ⃗ = 0 ⃗ } \text{ker}\left( T \right) = \{ x \in \mathbb{R}^{m} : A\vec{x} = \vec{0} \} = \{ \text{all solutions to } A\vec{x} = \vec{0} \} ker ( T ) = { x ∈ R m : A x = 0 } = { all solutions to A x = 0 }
Example
Find vectors that span the kernel of [ 1 − 3 − 3 9 ] \begin{bmatrix} 1 & -3 \\ -3 & 9 \end{bmatrix} [ 1 − 3 − 3 9 ] .
[ 1 − 3 ∣ 0 − 3 9 ∣ 0 ] → [ 1 − 3 ∣ 0 0 0 ∣ 0 ] \begin{bmatrix}
1 & -3 & \big| & 0 \\
-3 & 9 & \big| & 0
\end{bmatrix}
\to
\begin{bmatrix}
1 & -3 & \big| & 0 \\
0 & 0 & \big| & 0
\end{bmatrix} [ 1 − 3 − 3 9 ∣ ∣ ∣ ∣ 0 0 ] → [ 1 0 − 3 0 ∣ ∣ ∣ ∣ 0 0 ]
x 2 = t x_2 = t x 2 = t
x 1 − 3 t = 0 x_1 - 3t = 0 x 1 − 3 t = 0
x 1 = 3 t x_1 = 3t x 1 = 3 t
[ 3 t t ] = t [ 3 1 ] \begin{bmatrix} 3t \\ t \end{bmatrix} = t \begin{bmatrix} 3 \\ 1 \end{bmatrix} [ 3 t t ] = t [ 3 1 ]
ker ( A ) = span { [ 3 1 ] } \text{ker}\left( A \right) = \text{span} \{ \begin{bmatrix} 3 \\ 1 \end{bmatrix} \} ker ( A ) = span { [ 3 1 ] }
Example
Find vectors that span the kernel of [ 1 3 0 5 2 6 1 16 5 15 0 25 ] \begin{bmatrix} 1 & 3 & 0 & 5 \\ 2 & 6 & 1 & 16 \\ 5 & 15 & 0 & 25 \end{bmatrix} ⎣ ⎡ 1 2 5 3 6 15 0 1 0 5 16 25 ⎦ ⎤ .
[ 1 3 0 5 2 6 1 16 5 15 0 25 ] → [ 1 3 0 5 0 0 1 6 0 0 0 0 ] \begin{bmatrix}
1 & 3 & 0 & 5 \\
2 & 6 & 1 & 16 \\
5 & 15 & 0 & 25
\end{bmatrix}
\to
\begin{bmatrix}
1 & 3 & 0 & 5 \\
0 & 0 & 1 & 6 \\
0 & 0 & 0 & 0
\end{bmatrix} ⎣ ⎡ 1 2 5 3 6 15 0 1 0 5 16 25 ⎦ ⎤ → ⎣ ⎡ 1 0 0 3 0 0 0 1 0 5 6 0 ⎦ ⎤
x 2 = t x_2 = t x 2 = t
x 4 = r x_4 = r x 4 = r
x 1 = − 3 t − 5 r x_1 = -3t - 5r x 1 = − 3 t − 5 r
x 3 = − 6 r x_3 = -6r x 3 = − 6 r
[ − 3 t − 5 t t − 6 r r ] = t [ − 3 1 0 0 ] + r [ − 5 0 − 6 1 ] = span { [ − 3 1 0 0 ] , [ − 5 0 − 6 1 ] } \begin{bmatrix}
-3t - 5t \\
t \\
-6r \\
r
\end{bmatrix}
=
t \begin{bmatrix} -3 \\ 1 \\ 0 \\ 0 \end{bmatrix}
+ r \begin{bmatrix} -5 \\ 0 \\ -6 \\ 1 \end{bmatrix}
=
\text{span} \{ \begin{bmatrix} -3 \\ 1 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} -5 \\ 0 \\ -6\\ 1 \end{bmatrix} \} ⎣ ⎡ − 3 t − 5 t t − 6 r r ⎦ ⎤ = t ⎣ ⎡ − 3 1 0 0 ⎦ ⎤ + r ⎣ ⎡ − 5 0 − 6 1 ⎦ ⎤ = span { ⎣ ⎡ − 3 1 0 0 ⎦ ⎤ , ⎣ ⎡ − 5 0 − 6 1 ⎦ ⎤ }
Example
Find vectors that span the kernel of [ 1 1 − 2 − 1 − 1 2 ] \begin{bmatrix} 1 & 1 & -2 \\ -1 & -1 & 2 \end{bmatrix} [ 1 − 1 1 − 1 − 2 2 ]
[ 1 1 − 2 − 1 − 1 2 ] → [ 1 1 − 2 0 0 0 ] \begin{bmatrix} 1 & 1 & -2 \\ -1 & -1 & 2 \end{bmatrix}
\to
\begin{bmatrix} 1 & 1 & -2 \\ 0 & 0 & 0 \end{bmatrix} [ 1 − 1 1 − 1 − 2 2 ] → [ 1 0 1 0 − 2 0 ]
x 1 = − r + 2 s x_1 = -r + 2s x 1 = − r + 2 s
x 2 = r x_2 = r x 2 = r
x 3 = s x_3 = s x 3 = s
[ − r + 2 s r s ] = r [ − 1 1 0 ] + s [ 2 0 1 ] \begin{bmatrix} -r + 2s \\ r \\ s \end{bmatrix}
= r
\begin{bmatrix} -1 \\ 1 \\ 0 \end{bmatrix}
+ s
\begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix} ⎣ ⎡ − r + 2 s r s ⎦ ⎤ = r ⎣ ⎡ − 1 1 0 ⎦ ⎤ + s ⎣ ⎡ 2 0 1 ⎦ ⎤
ker ( A ) = span { [ − 1 1 0 ] , [ 2 0 1 ] } \text{ker}(A) = \text{span} \{ \begin{bmatrix} -1 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 2 \\ 0 \\1 \end{bmatrix} \} ker ( A ) = span { ⎣ ⎡ − 1 1 0 ⎦ ⎤ , ⎣ ⎡ 2 0 1 ⎦ ⎤ }
Properties of the kernel:
0 ⃗ ∈ ker ( A ) \vec{0} \in \text{ker}\left( A \right) 0 ∈ ker ( A )
If v ⃗ 1 \vec{v}_1 v 1 , v ⃗ 2 ∈ ker ( A ) \vec{v}_2 \in \text{ker}\left( A \right) v 2 ∈ ker ( A ) , then v ⃗ 1 + v ⃗ 2 ∈ ker ( A ) \vec{v}_1 + \vec{v}_2 \in \text{ker}\left( A \right) v 1 + v 2 ∈ ker ( A ) . Closed under addition.
If v ⃗ ∈ ker ( A ) \vec{v} \in \text{ker}\left( A \right) v ∈ ker ( A ) then k v ⃗ ∈ ker ( A ) k\vec{v} \in \text{ker}\left( A \right) k v ∈ ker ( A ) . Closed under scaler multiplication
Proof:
A 0 ⃗ = 0 ⃗ A\vec{0} = \vec{0} A 0 = 0
If A v ⃗ 1 = 0 ⃗ A\vec{v}_1 = \vec{0} A v 1 = 0 and A v ⃗ 2 = 0 ⃗ A\vec{v}_2 = \vec{0} A v 2 = 0 , then A ( v ⃗ 1 + v ⃗ 2 ) = A v ⃗ 1 + A v ⃗ 2 = 0 ⃗ + 0 ⃗ = 0 ⃗ A \left( \vec{v}_1 + \vec{v}_2\right) = A\vec{v}_1 + A \vec{v}_2 = \vec{0} + \vec{0} = \vec{0} A ( v 1 + v 2 ) = A v 1 + A v 2 = 0 + 0 = 0
If A v ⃗ A\vec{v} A v , then A ( k v ⃗ ) = k A v ⃗ = k 0 ⃗ = 0 ⃗ A\left( k\vec{v} \right) = kA\vec{v} = k\vec{0} = \vec{0} A ( k v ) = k A v = k 0 = 0 .
Give as few vectors as possible!!
Example
A = [ 1 − 3 − 3 9 ] A = \begin{bmatrix} 1 & -3 \\ -3 & 9 \end{bmatrix} A = [ 1 − 3 − 3 9 ]
rref ( A ) = [ 1 − 3 0 0 ] \text{rref}(A) = \begin{bmatrix} 1 & -3 \\ 0 & 0 \end{bmatrix} rref ( A ) = [ 1 0 − 3 0 ]
x [ 1 − 3 ] + y [ − 3 9 ] = ( x − 3 y ) [ 1 − 3 ] x \begin{bmatrix} 1 \\ -3 \end{bmatrix} + y \begin{bmatrix} -3 \\ 9 \end{bmatrix} = \left( x - 3y \right) \begin{bmatrix} 1 \\ -3 \end{bmatrix} x [ 1 − 3 ] + y [ − 3 9 ] = ( x − 3 y ) [ 1 − 3 ]
im ( A ) = span ( [ 1 − 3 ] ) \text{im}(A) = \text{span}\left( \begin{bmatrix} 1 \\ -3 \end{bmatrix} \right) im ( A ) = span ( [ 1 − 3 ] )
Example
A = [ 1 − 1 1 2 − 2 2 0 0 − 1 1 3 1 ] A = \begin{bmatrix} 1 & -1 & 1 & 2 \\ -2 & 2 & 0 & 0 \\ -1 & 1 & 3 & 1 \end{bmatrix} A = ⎣ ⎡ 1 − 2 − 1 − 1 2 1 1 0 3 2 0 1 ⎦ ⎤
rref ( A ) = [ 1 − 1 0 0 0 0 1 0 0 0 0 1 ] \text{rref}\left( A \right) = \begin{bmatrix} 1 & -1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} rref ( A ) = ⎣ ⎡ 1 0 0 − 1 0 0 0 1 0 0 0 1 ⎦ ⎤
lm ( A ) = span { [ 1 − 2 − 1 ] , [ − 1 2 1 ] , [ 1 0 3 ] , [ 2 0 1 ] } \text{lm}\left( A \right) = \text{span} \{ \begin{bmatrix} 1 \\ -2 \\ -1 \end{bmatrix}, \begin{bmatrix} -1 \\ 2 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \\ 3 \end{bmatrix}, \begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix} \} lm ( A ) = span { ⎣ ⎡ 1 − 2 − 1 ⎦ ⎤ , ⎣ ⎡ − 1 2 1 ⎦ ⎤ , ⎣ ⎡ 1 0 3 ⎦ ⎤ , ⎣ ⎡ 2 0 1 ⎦ ⎤ }
im ( A ) = span { [ 1 − 2 − 1 ] , [ 1 0 3 ] , [ 2 0 1 ] } \text{im}\left( A \right) = \text{span} \{ \begin{bmatrix} 1 \\ -2 \\ -1 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \\ 3 \end{bmatrix}, \begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix} \} im ( A ) = span { ⎣ ⎡ 1 − 2 − 1 ⎦ ⎤ , ⎣ ⎡ 1 0 3 ⎦ ⎤ , ⎣ ⎡ 2 0 1 ⎦ ⎤ }
Careful : Make sure you use columns in A A A corresponding to leading 1’s in rref \text{rref} rref .
Example
A = [ 1 2 3 1 2 3 1 2 3 1 2 3 ] A = \begin{bmatrix} 1 & 2 & 3 \\ 1 & 2 & 3 \\ 1 & 2 & 3 \\ 1 & 2 & 3 \end{bmatrix} A = ⎣ ⎡ 1 1 1 1 2 2 2 2 3 3 3 3 ⎦ ⎤
rref ( A ) = [ 1 2 3 0 0 0 0 0 0 0 0 0 ] \text{rref}\left( A \right) = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} rref ( A ) = ⎣ ⎡ 1 0 0 0 2 0 0 0 3 0 0 0 ⎦ ⎤
im ( A ) = span { [ 1 1 1 1 ] } ≠ span { [ 1 0 0 0 ] } = im ( rref ( A ) ) \text{im}\left( A \right) = \text{span}\{ \begin{bmatrix} 1 \\ 1 \\ 1\\ 1 \end{bmatrix} \} \neq \text{span} \{ \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} \} = \text{im} \left( \text{rref} \left( A \right) \right) im ( A ) = span { ⎣ ⎡ 1 1 1 1 ⎦ ⎤ } = span { ⎣ ⎡ 1 0 0 0 ⎦ ⎤ } = im ( rref ( A ) )
Note : im ( T ) \text{im}\left( T \right) im ( T ) or im ( A ) \text{im}\left( A \right) im ( A ) is a subspace of R n \mathbb{R}^{n} R n .
0 ⃗ ∈ im ( A ) \vec{0} \in \text{im}\left( A \right) 0 ∈ im ( A ) to
Closed under addition and scaler multiplication
Exercise
I 3 = [ 1 0 0 0 1 0 0 0 1 ] I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} I 3 = ⎣ ⎡ 1 0 0 0 1 0 0 0 1 ⎦ ⎤ . What is ker ( I 3 ) \text{ker}\left( I_3 \right) ker ( I 3 ) and im ( I 3 ) \text{im}\left( I_3 \right) im ( I 3 ) ?
ker ( I 3 ) = { 0 ⃗ } \text{ker}\left( I_3 \right) = \{ \vec{0} \} ker ( I 3 ) = { 0 }
im ( I 3 ) = R 3 \text{im}\left( I_3 \right) = \mathbb{R}^{3} im ( I 3 ) = R 3
Generally, if A A A is n × n n\times n n × n matrix,
im ( A ) = R n \text{im}\left( A \right) = \mathbb{R}^{n} im ( A ) = R n if and only if ker ( A ) = { 0 ⃗ } \text{ker}\left( A \right) = \{ \vec{0} \} ker ( A ) = { 0 } if and only if A A A is invertible.
A linear transformation T : R n → R n T : \mathbb{R}^{n} \to \mathbb{R}^{n} T : R n → R n is invertible if and only if:
The equation T ( x ⃗ ) = b ⃗ T \left( \vec{x} \right) = \vec{b} T ( x ) = b has a unique solution for any b ⃗ ∈ R n \vec{b} \in \mathbb{R}^{n} b ∈ R n .
The corresponding matrix A A A is invertible and ( T A ) − 1 = T A − 1 \left( T_A \right) ^{-1} = T_{A^{-1}} ( T A ) − 1 = T A − 1
There is a matrix B B B such that A B = I n AB = I_n A B = I n . Here B = A − 1 B = A^{-1} B = A − 1
There is a matrix C C C such that C A = I n CA = I_n C A = I n . Here C = A − 1 C = A^{-1} C = A − 1 .
The equation A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b has a unique solution for any b ⃗ ∈ R n \vec{b}\in \mathbb{R}^{n} b ∈ R n . The unique solution is given by x ⃗ = A − 1 b ⃗ \vec{x} = A^{-1} \vec{b} x = A − 1 b .
The equation A x ⃗ = 0 ⃗ A\vec{x} = \vec{0} A x = 0 only has zero solution.
rref ( A ) = I n \text{rref}\left( A \right) = I_n rref ( A ) = I n
rank ( A ) = n \text{rank}\left( A \right) = n rank ( A ) = n
The image of the transformation T T T is R n \mathbb{R}^{n} R n .
The transformation T T T is one-to-one
Basis : Spanning set with as few vectors as possible
Example
For A = [ 1 2 0 1 2 2 4 3 5 1 1 2 2 3 0 ] A = \begin{bmatrix} 1 & 2 & 0 & 1 & 2 \\ 2 & 4 & 3 & 5 & 1 \\ 1 & 2 & 2 & 3 & 0 \end{bmatrix} A = ⎣ ⎡ 1 2 1 2 4 2 0 3 2 1 5 3 2 1 0 ⎦ ⎤ , we are given rref ( A ) = [ 1 2 0 1 2 0 x y 1 − 1 0 0 0 0 0 ] \text{rref}\left( A \right) = \begin{bmatrix} 1 & 2 & 0 & 1 & 2\\ 0 & x & y & 1 & -1 \\ 0 & 0 & 0 & 0 & 0 \end{bmatrix} rref ( A ) = ⎣ ⎡ 1 0 0 2 x 0 0 y 0 1 1 0 2 − 1 0 ⎦ ⎤ .
Find x x x and y y y .
Find a basis for im ( A ) \text{im}\left( A \right) im ( A ) .
Find a basis for ker ( A ) \text{ker}\left( A \right) ker ( A ) .
Solution
x = 0 x=0 x = 0 , y = 1 y=1 y = 1
im ( A ) = span { [ 1 2 1 ] , [ 0 3 2 ] } \text{im}\left( A \right) = \text{span} \{ \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 3 \\ 2 \end{bmatrix} \} im ( A ) = span { ⎣ ⎡ 1 2 1 ⎦ ⎤ , ⎣ ⎡ 0 3 2 ⎦ ⎤ }
See below
x 2 = t x_2 = t x 2 = t
x 4 = r x_4 = r x 4 = r
x 5 = s x_5 = s x 5 = s
x 1 = − 2 t − r − 2 s x_1 = -2t - r - 2s x 1 = − 2 t − r − 2 s
x 3 = − r + s x_3 = -r + s x 3 = − r + s
[ − 2 t − r − 2 s t − r + s r s ] = t [ − 2 1 0 0 0 ] + r [ − 1 0 − 1 1 0 ] + s [ − 2 0 1 0 1 ] \begin{bmatrix} -2t - r -2s \\ t \\ -r+s \\ r \\ s \end{bmatrix} =
t\begin{bmatrix}-2 \\ 1 \\ 0 \\ 0 \\ 0 \end{bmatrix}
+ r \begin{bmatrix} -1 \\ 0 \\ -1 \\ 1 \\ 0 \end{bmatrix} + s \begin{bmatrix} -2 \\ 0 \\ 1 \\ 0 \\ 1 \end{bmatrix} ⎣ ⎡ − 2 t − r − 2 s t − r + s r s ⎦ ⎤ = t ⎣ ⎡ − 2 1 0 0 0 ⎦ ⎤ + r ⎣ ⎡ − 1 0 − 1 1 0 ⎦ ⎤ + s ⎣ ⎡ − 2 0 1 0 1 ⎦ ⎤
ker ( A ) = span { [ − 2 1 0 0 0 ] , [ − 1 0 − 1 1 0 ] , [ − 2 0 1 0 1 ] } \text{ker}\left( A \right) = \text{span}\{ \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} -1 \\ 0 \\ -1 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} -2 \\ 0 \\ 1 \\ 0 \\ 1 \end{bmatrix} \} ker ( A ) = span { ⎣ ⎡ − 2 1 0 0 0 ⎦ ⎤ , ⎣ ⎡ − 1 0 − 1 1 0 ⎦ ⎤ , ⎣ ⎡ − 2 0 1 0 1 ⎦ ⎤ }
3.2 Subspaces of R 2 \mathbb{R}^2 R 2 : Bases and Linear Independence 3.2 Subspaces of R 2 \mathbb{R}^2 R 2 : Bases and Linear Independence
Definition:
For W ⊆ R n W \subseteq \mathbb{R}^{n} W ⊆ R n , W W W is a subspace of R n \mathbb{R}^{n} R n provided
0 ⃗ ∈ W \vec{0} \in W 0 ∈ W
If v ⃗ 1 , v ⃗ 2 ∈ W \vec{v}_1,\ \vec{v}_2 \in W v 1 , v 2 ∈ W then v ⃗ 1 + v ⃗ 2 ∈ W \vec{v}_1 + \vec{v}_2 \in W v 1 + v 2 ∈ W
If v ⃗ ∈ W \vec{v} \in W v ∈ W , then k v ⃗ ∈ W k\vec{v} \in W k v ∈ W for all scalars k k k .
Which are subspaces of R 3 \mathbb{R}^{3} R 3 ?
1) Vectors [ x y z ] \begin{bmatrix} x \\ y \\ z \end{bmatrix} ⎣ ⎡ x y z ⎦ ⎤ with x = y x=y x = y .
0 ⃗ \vec{0} 0 is in set
[ t t a ] + [ s s b ] = [ t + s t + s a + b ] \begin{bmatrix} t \\ t \\ a \end{bmatrix} + \begin{bmatrix} s \\ s \\ b \end{bmatrix} = \begin{bmatrix} t + s \\ t + s \\ a+b \end{bmatrix} ⎣ ⎡ t t a ⎦ ⎤ + ⎣ ⎡ s s b ⎦ ⎤ = ⎣ ⎡ t + s t + s a + b ⎦ ⎤
k [ t t a ] = [ k t k t k a ] k \begin{bmatrix} t \\ t \\ a \end{bmatrix} = \begin{bmatrix} kt \\ kt \\ ka \end{bmatrix} k ⎣ ⎡ t t a ⎦ ⎤ = ⎣ ⎡ k t k t ka ⎦ ⎤
Yes!
2) Vectors [ x y z ] \begin{bmatrix} x \\ y \\ z \end{bmatrix} ⎣ ⎡ x y z ⎦ ⎤ with x = 1 x=1 x = 1 .
[ 0 0 0 ] \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} ⎣ ⎡ 0 0 0 ⎦ ⎤ not in set
No!
3) Vectors [ x y z ] \begin{bmatrix} x \\ y \\ z \end{bmatrix} ⎣ ⎡ x y z ⎦ ⎤ with x y z = 0 xyz = 0 x yz = 0 .
[ 1 0 1 ] + [ 1 1 0 ] = [ 2 1 1 ] \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} + \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix} ⎣ ⎡ 1 0 1 ⎦ ⎤ + ⎣ ⎡ 1 1 0 ⎦ ⎤ = ⎣ ⎡ 2 1 1 ⎦ ⎤ (not in set)
No; fails property 2.
Subspaces of R n \mathbb{R}^{n} R n is equivalent to span ( v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ m ) \text{span}\left( \vec{v}_1,\ \vec{v}_2,\ \cdots ,\ \vec{v}_m \right) span ( v 1 , v 2 , ⋯ , v m )
Example
A = [ 1 3 0 5 2 6 1 16 5 15 0 25 ] A = \begin{bmatrix} 1 & 3 & 0 & 5 \\ 2 & 6 & 1 & 16 \\ 5 & 15 & 0 & 25 \end{bmatrix} A = ⎣ ⎡ 1 2 5 3 6 15 0 1 0 5 16 25 ⎦ ⎤
rref ( A ) = [ 1 3 0 5 0 0 1 6 0 0 0 0 ] \text{rref}\left( A \right) = \begin{bmatrix} 1 & 3 & 0 & 5 \\ 0 & 0 & 1 & 6 \\ 0 & 0 & 0 & 0 \end{bmatrix} rref ( A ) = ⎣ ⎡ 1 0 0 3 0 0 0 1 0 5 6 0 ⎦ ⎤
im ( A ) = span { [ 1 2 5 ] , [ 3 6 15 ] , [ 0 1 0 ] , [ 5 16 25 ] } \text{im}\left( A \right) = \text{span}\{ \begin{bmatrix} 1 \\ 2 \\ 5 \end{bmatrix}, \begin{bmatrix} 3 \\ 6 \\ 15 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 5 \\ 16 \\ 25 \end{bmatrix} \} im ( A ) = span { ⎣ ⎡ 1 2 5 ⎦ ⎤ , ⎣ ⎡ 3 6 15 ⎦ ⎤ , ⎣ ⎡ 0 1 0 ⎦ ⎤ , ⎣ ⎡ 5 16 25 ⎦ ⎤ }
Few vectors as possible: im ( A ) = { [ 1 2 5 ] , [ 0 1 0 ] } \text{im}\left( A \right) = \{\begin{bmatrix}1 \\ 2 \\ 5 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \} im ( A ) = { ⎣ ⎡ 1 2 5 ⎦ ⎤ , ⎣ ⎡ 0 1 0 ⎦ ⎤ }
Definition:
Consider vectors v ⃗ 1 \vec{v}_1 v 1 , v ⃗ 2 \vec{v}_2 v 2 , ⋯ \cdots ⋯ , v ⃗ m \vec{v}_m v m in R n \mathbb{R}^{n} R n .
Vector v ⃗ i \vec{v} _{i} v i is redundant provided it is a linear combination of v ⃗ 1 \vec{v} _1 v 1 , v ⃗ 2 \vec{v} _2 v 2 , …, v ⃗ i − 1 \vec{v} _{i-1} v i − 1 . (0 ⃗ \vec{0} 0 is always redundant)
Vectors v ⃗ 1 \vec{v}_{1} v 1 , v ⃗ 2 \vec{v}_2 v 2 , …, v ⃗ m \vec{v}_m v m are linearly independent provided non of them are redundant.
Vectors v ⃗ 1 \vec{v}_1 v 1 , v ⃗ 2 \vec{v}_2 v 2 , …, v ⃗ m \vec{v}_m v m are linearly dependent provided at least one vector v ⃗ c \vec{v}_c v c is redundant.
Example
{ [ 1 2 5 ] , [ 0 1 0 ] , [ 3 6 15 ] , [ 5 16 25 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 5 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 3 \\ 6 \\ 15 \end{bmatrix} , \begin{bmatrix} 5 \\ 16 \\ 25 \end{bmatrix} \} { ⎣ ⎡ 1 2 5 ⎦ ⎤ , ⎣ ⎡ 0 1 0 ⎦ ⎤ , ⎣ ⎡ 3 6 15 ⎦ ⎤ , ⎣ ⎡ 5 16 25 ⎦ ⎤ } is a linearly dependent collection because v ⃗ 3 = 3 v ⃗ 1 \vec{v}_3 = 3 \vec{v}_1 v 3 = 3 v 1 and v ⃗ 4 = 5 v ⃗ 1 + 6 v ⃗ 2 \vec{v}_4 = 5\vec{v}_1 + 6 \vec{v}_2 v 4 = 5 v 1 + 6 v 2 .
Linear relations:
− 3 v ⃗ 1 + v ⃗ 3 = 0 ⃗ -3 \vec{v}_1 + \vec{v}_3 = \vec{0} − 3 v 1 + v 3 = 0
− 5 v ⃗ 1 − 6 v ⃗ 2 + v ⃗ 4 = 0 ⃗ -5 \vec{v}_1 - 6 \vec{v}_2 + \vec{v}_4 = \vec{0} − 5 v 1 − 6 v 2 + v 4 = 0
Generally, we consider linear relation c 1 v ⃗ 1 + c 2 v ⃗ 2 + ⋯ + c m v ⃗ m = 0 ⃗ c_1\vec{v}_1 + c_2\vec{v}_2 + \cdots + c_m\vec{v}_m = \vec{0} c 1 v 1 + c 2 v 2 + ⋯ + c m v m = 0 .
We always have a trivial relation : c 1 = c 2 = c 3 = ⋯ = c m = 0 c_1 = c_2 = c_3 = \cdots = c_m = 0 c 1 = c 2 = c 3 = ⋯ = c m = 0
nontrivial relation : When at least one c i c_i c i is non-zero.
Note : v ⃗ 1 \vec{v}_1 v 1 , v ⃗ 2 \vec{v}_2 v 2 , …, v ⃗ m \vec{v}_m v m are linearly dependent if and only if there exists a nontrivial relation among v ⃗ 1 \vec{v}_1 v 1 , v ⃗ 2 \vec{v}_2 v 2 , …, v ⃗ m \vec{v}_m v m .
This is a trivial relation:
0 [ 5 16 25 ] + 0 [ 1 2 5 ] + 0 [ 0 1 0 ] = [ 0 0 0 ] 0 \begin{bmatrix} 5 \\ 16 \\ 25 \end{bmatrix} + 0 \begin{bmatrix} 1 \\ 2 \\ 5 \end{bmatrix}
+
0 \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}
=
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} 0 ⎣ ⎡ 5 16 25 ⎦ ⎤ + 0 ⎣ ⎡ 1 2 5 ⎦ ⎤ + 0 ⎣ ⎡ 0 1 0 ⎦ ⎤ = ⎣ ⎡ 0 0 0 ⎦ ⎤
This is a nontrivial relation:
1 [ 5 16 25 ] − 5 [ 1 2 5 ] − 6 [ 0 1 0 ] = [ 0 0 0 ] 1 \begin{bmatrix} 5 \\ 16 \\ 25 \end{bmatrix}
- 5 \begin{bmatrix} 1 \\ 2 \\ 5 \end{bmatrix}
- 6 \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}
= \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} 1 ⎣ ⎡ 5 16 25 ⎦ ⎤ − 5 ⎣ ⎡ 1 2 5 ⎦ ⎤ − 6 ⎣ ⎡ 0 1 0 ⎦ ⎤ = ⎣ ⎡ 0 0 0 ⎦ ⎤
Example
The vectors { [ 1 6 ] , [ 0 0 ] } \{ \begin{bmatrix} 1 \\ 6 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \end{bmatrix} \} { [ 1 6 ] , [ 0 0 ] } are linearly dependent. (0 ⃗ \vec{0} 0 is never part of a linearly independent set)
0 ⃗ \vec{0} 0 is redundant:
0 [ 1 6 ] = [ 0 0 ] 0 \begin{bmatrix} 1 \\ 6 \end{bmatrix} =
\begin{bmatrix} 0 \\ 0 \end{bmatrix} 0 [ 1 6 ] = [ 0 0 ]
Nontrivial relation:
0 [ 1 6 ] + 10 [ 0 0 ] = 0 ⃗ 0 \begin{bmatrix} 1 \\ 6 \end{bmatrix}
+ 10 \begin{bmatrix} 0 \\ 0 \end{bmatrix}
= \vec{0} 0 [ 1 6 ] + 10 [ 0 0 ] = 0
Example
The vectors { [ 1 6 ] , [ 1 0 ] } \{\begin{bmatrix} 1 \\ 6 \end{bmatrix} , \begin{bmatrix} 1 \\ 0 \end{bmatrix} \} { [ 1 6 ] , [ 1 0 ] } are linearly independent.
There are no redundant vectors. Because if c 1 [ 1 6 ] + c 2 [ 1 0 ] = [ 0 0 ] c_1 \begin{bmatrix} 1 \\ 6 \end{bmatrix} + c_2 \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} c 1 [ 1 6 ] + c 2 [ 1 0 ] = [ 0 0 ] then 6 c 1 + 0 = 0 ⟹ c 1 = 0 6c_1 + 0 = 0 \implies c_1 = 0 6 c 1 + 0 = 0 ⟹ c 1 = 0 and 0 + c 2 = 0 ⟹ c 2 = 0 0 + c_2 = 0 \implies c_2 =0 0 + c 2 = 0 ⟹ c 2 = 0
Recall from 3.1: We found a basis for im ( A ) \text{im}\left( A \right) im ( A ) by listing all columns of A A A and omitting redundant vectors.
Let’s interpret a linear relation v 1 v ⃗ 1 + v 2 v ⃗ 2 + ⋯ + c m v ⃗ m = 0 ⃗ v_1 \vec{v}_1 + v_2 \vec{v}_2 + \cdots + c_m \vec{v}_m = \vec{0} v 1 v 1 + v 2 v 2 + ⋯ + c m v m = 0 as a matrix equation.
Let A = [ ∣ ∣ ∣ v ⃗ 1 v ⃗ 2 ⋯ v ⃗ m ∣ ∣ ∣ ] A = \begin{bmatrix} | & | & & | \\ \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_m \\ | & | & & | \end{bmatrix} A = ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v m ∣ ⎦ ⎤
Linear relation: A = [ c 1 c 2 ⋮ c m ] = 0 ⃗ A = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_m \end{bmatrix} = \vec{0} A = ⎣ ⎡ c 1 c 2 ⋮ c m ⎦ ⎤ = 0
Question: What does it mean to be linearly independent? For v ⃗ 1 \vec{v}_1 v 1 , … v ⃗ m \vec{v}_m v m and [ c 1 c 2 ⋮ c m ] = 0 ⃗ \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_m \end{bmatrix} = \vec{0} ⎣ ⎡ c 1 c 2 ⋮ c m ⎦ ⎤ = 0 ?
Answer:
Only solution to A x ⃗ = 0 ⃗ A\vec{x}= \vec{0} A x = 0 is x ⃗ = 0 ⃗ \vec{x}= \vec{0} x = 0
ker ( A ) = { 0 ⃗ } \text{ker}\left( A \right) = \{ \vec{0} \} ker ( A ) = { 0 } (no free variables)
rank ( A ) = m \text{rank}\left( A \right) = m rank ( A ) = m
Linearly Dependent Collections of Vectors
{ [ 7 1 ] , [ 14 22 ] } \{ \begin{bmatrix} 7 \\ 1 \end{bmatrix}, \begin{bmatrix} 14 \\ 22 \end{bmatrix} \} { [ 7 1 ] , [ 14 22 ] } (2nd one is redundant)
{ [ 1 2 1 ] , [ 1 0 0 ] , [ 3 3 3 ] , [ − 1 11 7 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 3 \\ 3 \\ 3 \end{bmatrix} , \begin{bmatrix} -1 \\ 11 \\ 7 \end{bmatrix} \} { ⎣ ⎡ 1 2 1 ⎦ ⎤ , ⎣ ⎡ 1 0 0 ⎦ ⎤ , ⎣ ⎡ 3 3 3 ⎦ ⎤ , ⎣ ⎡ − 1 11 7 ⎦ ⎤ } (4 vectors in R 3 \mathbb{R}^{3} R 3 are dependent)
{ [ 0 0 0 0 ] } \{ \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 0 0 0 0 ⎦ ⎤ } (0 ⃗ \vec{0} 0 is in set)
{ [ 3 2 1 0 ] , [ − 3 − 2 − 1 0 ] , [ 1 0 0 10 ] } \{ \begin{bmatrix} 3 \\ 2 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} -3 \\ -2 \\ -1 \\ 0 \end{bmatrix} , \begin{bmatrix} 1 \\ 0 \\ 0 \\ 10 \end{bmatrix} \} { ⎣ ⎡ 3 2 1 0 ⎦ ⎤ , ⎣ ⎡ − 3 − 2 − 1 0 ⎦ ⎤ , ⎣ ⎡ 1 0 0 10 ⎦ ⎤ } (2nd vector is redundant)
Linearly Independent Collections of Vectors
{ [ 1 0 0 ] , [ 1 2 0 ] , [ 1 2 3 ] } \{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix} , \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} \} { ⎣ ⎡ 1 0 0 ⎦ ⎤ , ⎣ ⎡ 1 2 0 ⎦ ⎤ , ⎣ ⎡ 1 2 3 ⎦ ⎤ } (Because rank [ 1 1 1 0 2 2 0 0 3 ] = 3 \text{rank} \begin{bmatrix} 1 & 1 & 1 \\ 0 & 2 & 2 \\ 0 & 0 & 3 \end{bmatrix} = 3 rank ⎣ ⎡ 1 0 0 1 2 0 1 2 3 ⎦ ⎤ = 3 , it is independent)
{ [ − 4 1 0 3 ] } \{ \begin{bmatrix} -4 \\ 1 \\ 0 \\3 \end{bmatrix} \} { ⎣ ⎡ − 4 1 0 3 ⎦ ⎤ } (No redundant vectors)
{ [ 0 2 1 0 3 ] , [ 0 8 − 7 − 1 − 3 ] , [ 1 0 2 10 6 ] } \{ \begin{bmatrix} 0 \\ 2 \\ 1 \\ 0 \\ 3 \end{bmatrix} , \begin{bmatrix} 0 \\ 8 \\ -7 \\ -1 \\ -3 \end{bmatrix} , \begin{bmatrix} 1 \\ 0 \\ 2 \\ 10 \\ 6 \end{bmatrix} \} { ⎣ ⎡ 0 2 1 0 3 ⎦ ⎤ , ⎣ ⎡ 0 8 − 7 − 1 − 3 ⎦ ⎤ , ⎣ ⎡ 1 0 2 10 6 ⎦ ⎤ }
If c 1 v ⃗ 1 + c 2 v ⃗ 2 + c 3 v ⃗ 3 = 0 ⃗ c_1 \vec{v}_1 + c_2 \vec{v}_2 + c_3 \vec{v}_3 = \vec{0} c 1 v 1 + c 2 v 2 + c 3 v 3 = 0 , we have 0 + 0 + c 3 = 0 ⟹ c 3 = 0 0+0+c_3 = 0 \implies c_3 =0 0 + 0 + c 3 = 0 ⟹ c 3 = 0 , 0 − c 2 + 0 = 0 ⟹ c 2 = 0 0-c_2+0=0 \implies c_2=0 0 − c 2 + 0 = 0 ⟹ c 2 = 0 , 2 c 1 + 0 + 0 = 0 ⟹ c 1 = 0 2c_1+0+0=0 \implies c_1=0 2 c 1 + 0 + 0 = 0 ⟹ c 1 = 0
Example
Determine whether the vectors { [ 1 1 1 ] , [ 1 2 3 ] , [ 1 4 7 ] } \{ \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} , \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} , \begin{bmatrix} 1 \\ 4 \\ 7 \end{bmatrix} \} { ⎣ ⎡ 1 1 1 ⎦ ⎤ , ⎣ ⎡ 1 2 3 ⎦ ⎤ , ⎣ ⎡ 1 4 7 ⎦ ⎤ } are linearly independent.
[ 1 1 1 1 3 4 1 3 7 ] → [ 1 1 1 0 1 3 0 2 6 ] \begin{bmatrix}
1 & 1 & 1 \\
1 & 3 & 4 \\
1 & 3 & 7
\end{bmatrix}
\to
\begin{bmatrix}
1 & 1 & 1 \\
0 & 1 & 3 \\
0 & 2 & 6
\end{bmatrix} ⎣ ⎡ 1 1 1 1 3 3 1 4 7 ⎦ ⎤ → ⎣ ⎡ 1 0 0 1 1 2 1 3 6 ⎦ ⎤
→ [ 1 1 1 0 1 3 0 0 0 ] → [ 1 0 − 2 0 1 3 0 0 0 ] \to
\begin{bmatrix}
1 & 1 & 1 \\
0 & 1 & 3 \\
0 & 0 & 0
\end{bmatrix}
\to
\begin{bmatrix}
1 & 0 & -2 \\
0 & 1 & 3 \\
0 & 0 & 0
\end{bmatrix} → ⎣ ⎡ 1 0 0 1 1 0 1 3 0 ⎦ ⎤ → ⎣ ⎡ 1 0 0 0 1 0 − 2 3 0 ⎦ ⎤
Therefore the rank is 2 (and therefore is dependent)
[ 1 4 7 ] = − 2 [ 1 1 1 ] + 3 [ 1 2 3 ] \begin{bmatrix}
1 \\
4 \\
7
\end{bmatrix}
=
-2
\begin{bmatrix}
1 \\ 1 \\ 1
\end{bmatrix}
+ 3 \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} ⎣ ⎡ 1 4 7 ⎦ ⎤ = − 2 ⎣ ⎡ 1 1 1 ⎦ ⎤ + 3 ⎣ ⎡ 1 2 3 ⎦ ⎤
Remark : [ 5 2 1 ] = 5 e ⃗ 1 + 2 e ⃗ 2 + 1 e ⃗ 3 \begin{bmatrix} 5 \\ 2 \\ 1 \end{bmatrix} = 5\vec{e}_1 + 2\vec{e}_2 + 1\vec{e}_3 ⎣ ⎡ 5 2 1 ⎦ ⎤ = 5 e 1 + 2 e 2 + 1 e 3 . This is the unique way of writing [ 5 2 1 ] \begin{bmatrix} 5 \\ 2 \\ 1 \end{bmatrix} ⎣ ⎡ 5 2 1 ⎦ ⎤ in terms of basis { e ⃗ 1 , e ⃗ 2 , e ⃗ 3 } \{ \vec{e}_1,\ \vec{e}_2,\ \vec{e}_3 \} { e 1 , e 2 , e 3 } of R 3 \mathbb{R}^{3} R 3 .
Theorem:
Suppose { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ m } \{ \vec{v}_1,\ \vec{v}_2, \cdots ,\ \vec{v}_m \} { v 1 , v 2 , ⋯ , v m } is a basis for a subspace W W W of R n \mathbb{R}^{n} R n . Then, for v ⃗ \vec{v} v in W W W , v ⃗ \vec{v} v can be expressed uniquely as a linear combination of { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ m } \{ \vec{v}_1,\ \vec{v}_2,\ \cdots ,\ \vec{v}_m \} { v 1 , v 2 , ⋯ , v m } .
Proof: Suppose { v ⃗ 1 , ⋯ , v ⃗ n } \{ \vec{v}_1 ,\cdots , \vec{v}_n \} { v 1 , ⋯ , v n } is a basis for W W W and v ⃗ \vec{v} v in W W W . { v ⃗ 1 , ⋯ , v ⃗ n } \{ \vec{v}_1 , \cdots , \vec{v}_n \} { v 1 , ⋯ , v n } spans W W W therefore there exists c 1 , c 2 , ⋯ , c m c_1, c_2, \cdots , c_m c 1 , c 2 , ⋯ , c m with v ⃗ = v 1 v ⃗ 1 + ⋯ + c m v ⃗ m \vec{v} = v_1 \vec{v}_1 + \cdots + c_m \vec{v}_m v = v 1 v 1 + ⋯ + c m v m . Suppose v ⃗ = d 1 v ⃗ 1 + d 2 v ⃗ 2 + ⋯ + d m v ⃗ m \vec{v} = d_1 \vec{v}_1 + d_2 \vec{v}_2 + \cdots + d_m \vec{v}_m v = d 1 v 1 + d 2 v 2 + ⋯ + d m v m . Show d i = c i d_i = c_i d i = c i for 1 ≤ i ≤ m 1 \le i \le m 1 ≤ i ≤ m . 0 ⃗ = v ⃗ − v ⃗ = ( d 1 − c 1 ) v ⃗ 1 + ( d 2 − c 2 ) v ⃗ 2 + ⋯ + ( d m − d m ) v ⃗ m \vec{0} = \vec{v} - \vec{v} = \left( d_1 - c_1 \right) \vec{v}_1 + \left( d_2 - c_2 \right) \vec{v}_2 + \cdots + \left( d_m - d_m \right) \vec{v}_m 0 = v − v = ( d 1 − c 1 ) v 1 + ( d 2 − c 2 ) v 2 + ⋯ + ( d m − d m ) v m as v ⃗ 1 , ⋯ , v ⃗ m \vec{v}_1, \cdots , \vec{v}_m v 1 , ⋯ , v m are linearly independent, d 1 − c 1 = c 2 − c 2 = ⋯ = d m − c m = 0 d_1 - c_1 = c_2 - c_2 = \cdots = d_m - c_m = 0 d 1 − c 1 = c 2 − c 2 = ⋯ = d m − c m = 0 meaning d i = c i d_i = c_i d i = c i for 1 ≤ i ≤ m 1 \le i \le m 1 ≤ i ≤ m . This shows uniqueness.
3.3 The Dimension of a Subspace of R n \mathbb{R}^n R n 3.3 The Dimension of a Subspace of R n \mathbb{R}^n R n
Theorem : Suppose v ⃗ 1 , ⋯ , v ⃗ p \vec{v}_1,\ \cdots , \vec{v}_p v 1 , ⋯ , v p , w ⃗ 1 , ⋯ , w ⃗ 1 \vec{w}_1 , \cdots , \vec{w}_1 w 1 , ⋯ , w 1 are vectors in a subspace W W W of R n \mathbb{R}^{n} R n . If
v ⃗ 1 , ⋯ , v ⃗ p \vec{v}_1 , \cdots , \vec{v}_p v 1 , ⋯ , v p are linearly independent and
w ⃗ 1 , ⋯ , w ⃗ q \vec{w}_1 , \cdots , \vec{w}_q w 1 , ⋯ , w q span W W W , then p ≤ q p \le q p ≤ q .
Every basis for W W W has the same number of vectors.
Definition : The dimension of a subspace W W W , denoted dim ( W ) \text{dim}\left( W \right) dim ( W ) , is the number of vectors in a basis for W W W .
Example
dim ( R n ) = n \text{dim}\left( \mathbb{R}^{n} \right) = n dim ( R n ) = n
Basis: { e ⃗ 1 , e ⃗ 2 , e ⃗ 3 , ⋯ , e ⃗ n } \{ \vec{e}_1, \vec{e}_2, \vec{e}_3, \cdots , \vec{e}_n \} { e 1 , e 2 , e 3 , ⋯ , e n }
dim ( { 0 ⃗ } ) = 0 \text{dim}\left( \{ \vec{0} \} \right) = 0 dim ( { 0 } ) = 0 (By convention)
Example
Consider the subspace { z = 0 } \{ z = 0 \} { z = 0 } in R 3 \mathbb{R}^{3} R 3 . The dimension is 2 (because it’s a plane)
{ [ 1 2 0 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 1 2 0 ⎦ ⎤ } { [ 1 0 0 ] , [ 1 2 0 ] } \{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 1 0 0 ⎦ ⎤ , ⎣ ⎡ 1 2 0 ⎦ ⎤ } { [ 0 1 0 ] } \{ \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 0 1 0 ⎦ ⎤ } { [ 0 1 0 ] , [ 5 1 0 ] } \{ \begin{bmatrix} 0 \\ 1\\ 0 \end{bmatrix}, \begin{bmatrix} 5 \\ 1 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 0 1 0 ⎦ ⎤ , ⎣ ⎡ 5 1 0 ⎦ ⎤ } (All linearly independent)
{ [ 1 0 0 ] , [ 7 − 1 0 ] , [ 0 1 0 ] } \{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 7 \\ -1 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 1 0 0 ⎦ ⎤ , ⎣ ⎡ 7 − 1 0 ⎦ ⎤ , ⎣ ⎡ 0 1 0 ⎦ ⎤ } { [ 1 0 0 ] , [ 0 1 0 ] } \{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 1 0 0 ⎦ ⎤ , ⎣ ⎡ 0 1 0 ⎦ ⎤ } { [ 2 2 0 ] , [ 1 1 0 ] , [ 0 1 0 ] , [ 0 0 0 ] } \{ \begin{bmatrix} 2 \\ 2 \\ 0 \end{bmatrix} , \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 2 2 0 ⎦ ⎤ , ⎣ ⎡ 1 1 0 ⎦ ⎤ , ⎣ ⎡ 0 1 0 ⎦ ⎤ , ⎣ ⎡ 0 0 0 ⎦ ⎤ } (All span subspace)
Generally, for a subspace W W W of R n \mathbb{R}^{n} R n with dim ( W ) = m \text{dim}\left( W \right) = m dim ( W ) = m ,
We can find at most m m m linearly independent vectors in W W W .
We need at least m m m vectors to span W W W .
Suppose we know dim ( W ) = m \text{dim}\left( W \right) = m dim ( W ) = m ,
Any collection of m m m linearly independent vectors is a basis.
Any collection of m m m vectors that span W W W is a basis.
Example
Show the vectors { [ 1 0 0 2 ] , [ 0 1 0 3 ] , [ 0 0 1 4 ] , [ 2 3 4 0 ] } \{ \begin{bmatrix} 1 \\ 0 \\ 0 \\ 2 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 0 \\ 3 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 1 \\ 4 \end{bmatrix} , \begin{bmatrix} 2 \\ 3 \\ 4 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 1 0 0 2 ⎦ ⎤ , ⎣ ⎡ 0 1 0 3 ⎦ ⎤ , ⎣ ⎡ 0 0 1 4 ⎦ ⎤ , ⎣ ⎡ 2 3 4 0 ⎦ ⎤ } form a basis for R 4 \mathbb{R}^{4} R 4 .
dim ( R 4 ) = 4 \text{dim}\left( \mathbb{R}^{4} \right) = 4 dim ( R 4 ) = 4
[ 1 0 0 2 0 1 0 3 0 0 1 4 2 3 4 0 ] → [ 1 0 0 2 0 1 0 3 0 0 1 4 0 0 0 − 29 ] \begin{bmatrix}
1 & 0 & 0 & 2\\
0 & 1 & 0 & 3 \\
0 & 0 & 1 & 4 \\
2 & 3 & 4 & 0
\end{bmatrix}
\to
\begin{bmatrix}
1 & 0 & 0 & 2 \\
0 & 1 & 0 & 3 \\
0 & 0 & 1 & 4 \\
0 & 0 & 0 & -29
\end{bmatrix} ⎣ ⎡ 1 0 0 2 0 1 0 3 0 0 1 4 2 3 4 0 ⎦ ⎤ → ⎣ ⎡ 1 0 0 0 0 1 0 0 0 0 1 0 2 3 4 − 29 ⎦ ⎤
rank ( A ) = 4 \text{rank}\left( A \right) = 4 rank ( A ) = 4
Therefore vectors are independent and hence a basis.
We see in the above example: Vectors v ⃗ 1 , ⋯ , v ⃗ n \vec{v}_1 , \cdots , \vec{v}_n v 1 , ⋯ , v n form a basis for R n \mathbb{R}^{n} R n if and only if:
[ ∣ ∣ ∣ v ⃗ 1 v ⃗ 2 ⋯ v ⃗ n ∣ ∣ ∣ ] \begin{bmatrix} | & | & & | \\ \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_n \\ | & | & & | \end{bmatrix} ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v n ∣ ⎦ ⎤ is invertible.
This gives yet another characterization of invertible matrices
Rank-Nullity Theorem
Let A A A by n × m n\times m n × m matrix.
dim ( ker ( A ) ) + dim ( im ( A ) ) = m \text{dim}\left( \text{ker}\left( A \right) \right) + \text{dim}\left( \text{im}\left( A \right) \right) = m dim ( ker ( A ) ) + dim ( im ( A ) ) = m
dim ( ker ( ) ) \text{dim}\left( \text{ker}\left( \right) \right) dim ( ker ( ) ) called nullity of matrix
dim ( im ( A ) ) \text{dim}\left( \text{im}\left( A \right) \right) dim ( im ( A ) ) is rank of matrix
Restated: rank ( A ) + nullity ( A ) = m \text{rank}\left( A \right) + \text{nullity}\left( A \right) = m rank ( A ) + nullity ( A ) = m (Number of columns)
Recall: For A = [ 1 2 0 1 2 2 4 3 5 1 1 2 2 3 0 ] A = \begin{bmatrix} 1 & 2 & 0 & 1 & 2 \\ 2 & 4 & 3 & 5 & 1 \\ 1 & 2 & 2 & 3 & 0 \end{bmatrix} A = ⎣ ⎡ 1 2 1 2 4 2 0 3 2 1 5 3 2 1 0 ⎦ ⎤ ,
Basis for im ( A ) \text{im}\left( A \right) im ( A ) : { [ 1 2 1 ] , [ 0 3 2 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix} , \begin{bmatrix} 0 \\ 3 \\ 2 \end{bmatrix} \} { ⎣ ⎡ 1 2 1 ⎦ ⎤ , ⎣ ⎡ 0 3 2 ⎦ ⎤ } (dim 2 \text{dim} 2 dim 2 )
Basis for ker ( A ) \text{ker}\left( A \right) ker ( A ) : { [ − 2 1 0 0 0 ] , [ − 1 0 − 1 1 0 ] , [ − 2 0 1 0 1 ] } \{ \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} -1 \\ 0 \\ -1 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} -2 \\ 0 \\ 1 \\ 0 \\ 1 \end{bmatrix} \} { ⎣ ⎡ − 2 1 0 0 0 ⎦ ⎤ , ⎣ ⎡ − 1 0 − 1 1 0 ⎦ ⎤ , ⎣ ⎡ − 2 0 1 0 1 ⎦ ⎤ } (dim 3 \text{dim} 3 dim 3 )
2 + 3 = 5 2+3 = 5 2 + 3 = 5
Example
Suppose we have a linear transformation T : R 5 → R 3 T : \mathbb{R}^{5} \to \mathbb{R}^{3} T : R 5 → R 3 .
What are possible values for dim ( ker ( T ) ) \text{dim}\left( \text{ker}\left( T \right) \right) dim ( ker ( T ) ) ?
A A A is 3 × 5 3\times 5 3 × 5
rank ( A ) ≤ 3 \text{rank}\left( A \right) \le 3 rank ( A ) ≤ 3
rank ( A ) + dim ( ker ( T ) ) = 5 \text{rank}\left( A \right) + \text{dim}\left( \text{ker}\left( T \right) \right) = 5 rank ( A ) + dim ( ker ( T ) ) = 5
(Cannot be one-to-one)
Answer: 2, 3, 4, or 5
Rank A
nullity
0
5
1
4
2
3
3
2
Example
Suppose we have a linear transformation T : R 4 → R 7 T : \mathbb{R}^{4} \to \mathbb{R}^{7} T : R 4 → R 7 .
What are possible values for dim ( im ( T ) ) \text{dim}\left( \text{im}\left( T \right) \right) dim ( im ( T ) ) ?
A A A is 7 × 4 7\times 4 7 × 4
rank ( A ) ≤ 4 \text{rank}\left( A \right) \le 4 rank ( A ) ≤ 4
Answer: 0, 1, 2, 3, 4
Test 1 Preparation Test 1 Preparation
Sample Test 1
1) Suppose T 1 , T 2 : R 2 → R 2 T_1,\ T_2 : \mathbb{R}^{2} \to \mathbb{R}^{2} T 1 , T 2 : R 2 → R 2 are linear transformations such that
T 1 T_1 T 1 is orthogonal projection onto the line y = − 3 x y=-3x y = − 3 x .
T 2 T_2 T 2 is scaling by a factor of 5
a) Find the matrix A A A of the transformation T 2 T 1 T_2T_1 T 2 T 1 . Show your work
Solution
L = span { [ 1 − 3 ] } L = \text{span} \{ \begin{bmatrix} 1 \\ -3 \end{bmatrix} \} L = span { [ 1 − 3 ] }
5 1 1 2 + ( − 3 ) 2 [ 1 − 3 − 3 9 ] = 1 2 [ 1 − 3 − 3 9 ] 5 \frac{1}{1^2 + (-3)^2} \begin{bmatrix} 1 & -3 \\ -3 & 9 \end{bmatrix} = \frac{1}{2} \begin{bmatrix} 1 & -3 \\ -3 & 9 \end{bmatrix} 5 1 2 + ( − 3 ) 2 1 [ 1 − 3 − 3 9 ] = 2 1 [ 1 − 3 − 3 9 ]
b) Determine weather or not the transformation T : R 2 → R 2 T : \mathbb{R}^{2} \to \mathbb{R}^{2} T : R 2 → R 2 given by T ( [ x y ] ) = [ 2 − x y − 2 x ] T \left( \begin{bmatrix} x \\ y \end{bmatrix} \right) = \begin{bmatrix} 2 - x \\ y - 2x \end{bmatrix} T ( [ x y ] ) = [ 2 − x y − 2 x ] is a linear transformation. If so, find its associated matrix. If not, give a reason as to why not.
Solution
T ( 0 ⃗ ) = [ 2 0 ] ≠ 0 ⃗ T\left( \vec{0} \right) = \begin{bmatrix} 2 \\ 0 \end{bmatrix} \neq \vec{0} T ( 0 ) = [ 2 0 ] = 0
Therefore T T T is not a linear transformation.
2) For which values of a , b , c , d a,b,c,d a , b , c , d and e e e is the following matrix in reduced row-echelon form? Choose an answer from 0, 1, any real number. No explanation needed
A = [ 1 a b 9 0 7 0 c 0 1 0 d 0 e 0 0 1 9 ] A = \begin{bmatrix}
1 & a & b & 9 & 0 & 7 \\
0 & c & 0 & 1 & 0 & d \\
0 & e & 0 & 0 & 1 & 9
\end{bmatrix} A = ⎣ ⎡ 1 0 0 a c e b 0 0 9 1 0 0 0 1 7 d 9 ⎦ ⎤
Solution
a = 0 a = 0 a = 0
a = a = a = any
c = 1 c=1 c = 1
d = d = d = any
e = 0 e=0 e = 0
3) Write b ⃗ = [ 10 0 2 ] \vec{b} = \begin{bmatrix} 10 \\ 0 \\ 2 \end{bmatrix} b = ⎣ ⎡ 10 0 2 ⎦ ⎤ a linear combination of v ⃗ 1 = [ 1 2 1 ] \vec{v}_1 = \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix} v 1 = ⎣ ⎡ 1 2 1 ⎦ ⎤ and v ⃗ 2 = [ 4 3 2 ] \vec{v}_2 = \begin{bmatrix} 4 \\ 3 \\ 2 \end{bmatrix} v 2 = ⎣ ⎡ 4 3 2 ⎦ ⎤ . Show your work
Solution
Find x 1 x_1 x 1 , x 2 x_2 x 2 with x 1 [ 1 2 1 ] + x 2 [ 4 3 2 ] = [ 10 0 2 ] x_1 \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix} + x_2 \begin{bmatrix} 4 \\ 3 \\ 2 \end{bmatrix} = \begin{bmatrix} 10 \\ 0 \\ 2 \end{bmatrix} x 1 ⎣ ⎡ 1 2 1 ⎦ ⎤ + x 2 ⎣ ⎡ 4 3 2 ⎦ ⎤ = ⎣ ⎡ 10 0 2 ⎦ ⎤ .
[ 1 4 ∣ 10 2 3 ∣ 0 1 2 ∣ 2 ] → [ 1 4 ∣ 10 0 − 5 ∣ − 20 0 − 2 ∣ − 8 ] \begin{bmatrix}
1 & 4 & | & 10 \\
2 & 3 & | & 0 \\
1 & 2 & | & 2
\end{bmatrix}
\to
\begin{bmatrix}
1 & 4 & | & 10 \\
0 & -5 & | & -20 \\
0 & -2 & | & -8
\end{bmatrix} ⎣ ⎡ 1 2 1 4 3 2 ∣ ∣ ∣ 10 0 2 ⎦ ⎤ → ⎣ ⎡ 1 0 0 4 − 5 − 2 ∣ ∣ ∣ 10 − 20 − 8 ⎦ ⎤
→ [ 1 4 ∣ 10 0 1 ∣ 4 0 − 2 ∣ − 8 ] → [ 1 0 ∣ − 6 0 1 ∣ 4 0 0 ∣ 0 ] \to
\begin{bmatrix}
1 & 4 & | & 10 \\
0 & 1 & | & 4 \\
0 & -2 & | & -8
\end{bmatrix}
\to
\begin{bmatrix}
1 & 0 & | & -6 \\
0 & 1 & | & 4 \\
0 & 0 & | & 0
\end{bmatrix} → ⎣ ⎡ 1 0 0 4 1 − 2 ∣ ∣ ∣ 10 4 − 8 ⎦ ⎤ → ⎣ ⎡ 1 0 0 0 1 0 ∣ ∣ ∣ − 6 4 0 ⎦ ⎤
x 1 = − 6 x_1 = -6 x 1 = − 6
x 2 = 4 x_2 = 4 x 2 = 4
b ⃗ = − 6 [ 1 2 1 ] + 4 [ 4 3 2 ] \vec{b} = -6 \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix} + 4 \begin{bmatrix} 4 \\ 3 \\ 2 \end{bmatrix} b = − 6 ⎣ ⎡ 1 2 1 ⎦ ⎤ + 4 ⎣ ⎡ 4 3 2 ⎦ ⎤
4) Find all upper triangular 3 × 3 3\times 3 3 × 3 matrices [ a b c 0 d e 0 0 f ] \begin{bmatrix} a & b & c \\ 0 & d & e \\ 0 & 0 & f \end{bmatrix} ⎣ ⎡ a 0 0 b d 0 c e f ⎦ ⎤ that commute with [ 0 0 − 1 0 2 0 1 0 0 ] \begin{bmatrix} 0 & 0 & -1 \\ 0 & 2 & 0 \\ 1 & 0 & 0 \end{bmatrix} ⎣ ⎡ 0 0 1 0 2 0 − 1 0 0 ⎦ ⎤ . Show your work
Solution
[ a b c 0 d e 0 0 f ] [ 0 0 − 1 0 2 0 1 0 0 ] = [ c 2 b − a e 2 d 0 f 0 0 ] \begin{bmatrix}
a & b & c \\
0 & d & e \\
0 & 0 & f
\end{bmatrix}
\begin{bmatrix}
0 & 0 & -1 \\
0 & 2 & 0 \\
1 & 0 & 0
\end{bmatrix}
=
\begin{bmatrix}
c & 2b & -a \\
e & 2d & 0 \\
f & 0 & 0
\end{bmatrix} ⎣ ⎡ a 0 0 b d 0 c e f ⎦ ⎤ ⎣ ⎡ 0 0 1 0 2 0 − 1 0 0 ⎦ ⎤ = ⎣ ⎡ c e f 2 b 2 d 0 − a 0 0 ⎦ ⎤
[ 0 0 − 1 0 2 0 1 0 0 ] [ a b c 0 d e 0 0 0 ] = [ 0 0 − f 0 2 d 2 e a b c ] \begin{bmatrix}
0 & 0 & -1 \\
0 & 2 & 0 \\
1 & 0 & 0
\end{bmatrix}
\begin{bmatrix}
a & b & c \\
0 & d & e \\
0 & 0 & 0
\end{bmatrix}
=
\begin{bmatrix}
0 & 0 & -f \\
0 & 2d & 2e \\
a & b & c
\end{bmatrix} ⎣ ⎡ 0 0 1 0 2 0 − 1 0 0 ⎦ ⎤ ⎣ ⎡ a 0 0 b d 0 c e 0 ⎦ ⎤ = ⎣ ⎡ 0 0 a 0 2 d b − f 2 e c ⎦ ⎤
b = c = e = 0 b=c=e=0 b = c = e = 0
a = f a=f a = f
d = d d=d d = d
Answer: [ a 0 0 0 d 0 0 0 a ] \begin{bmatrix} a & 0 & 0 \\ 0 & d & 0 \\ 0 & 0 & a \end{bmatrix} ⎣ ⎡ a 0 0 0 d 0 0 0 a ⎦ ⎤ a , d ∈ R a, d \in \mathbb{R} a , d ∈ R
5) Suppose A A A is 2 × 3 2\times 3 2 × 3 , B B B is 3 × 3 3\times 3 3 × 3 , C C C is 3 × 2 3\times 2 3 × 2 , and D D D is 2 × 1 2\times 1 2 × 1 . Which matrix operations that are defined? No justification needed
A C + B ; C A ; C B ; B C D ; A ( B + C ) AC+B; CA; CB; BCD; A(B+C) A C + B ; C A ; CB ; BC D ; A ( B + C )
Solution
C A CA C A and C B D CBD CB D are defined.
6) Let A = [ 1 3 4 0 0 1 0 0 0 0 0 2 0 0 1 0 ] A = \begin{bmatrix} 1 & 3 & 4 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 2 \\ 0 & 0 & 1 & 0 \end{bmatrix} A = ⎣ ⎡ 1 0 0 0 3 1 0 0 4 0 0 1 0 0 2 0 ⎦ ⎤ . Show your work
a) Use Elementary Row Operations to find A − 1 A^{-1} A − 1 .
Solution
A − 1 = [ 1 − 3 0 − 4 0 1 0 0 0 0 0 1 0 0 1 2 0 ] A^{-1} = \begin{bmatrix} 1 & -3 & 0 & -4 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & \frac{1}{2} & 0 \end{bmatrix} A − 1 = ⎣ ⎡ 1 0 0 0 − 3 1 0 0 0 0 0 2 1 − 4 0 1 0 ⎦ ⎤
b) Use part (a) to find all solutions to the linear system A x ⃗ = [ 0 2 0 0 ] A\vec{x} = \begin{bmatrix} 0 \\ 2 \\ 0 \\ 0 \end{bmatrix} A x = ⎣ ⎡ 0 2 0 0 ⎦ ⎤ .
Solution
x ⃗ = A − 1 b ⃗ \vec{x} = A^{-1}\vec{b} x = A − 1 b
[ 1 − 3 0 − 4 0 1 0 0 0 0 0 1 0 0 1 2 0 ] [ 0 2 0 0 ] \begin{bmatrix}
1 & -3 & 0 & -4 \\
0 & 1 & 0 & 0 \\
0 & 0 & 0 & 1 \\
0 & 0 & \frac{1}{2} & 0
\end{bmatrix}
\begin{bmatrix}
0 \\ 2\\ 0 \\ 0
\end{bmatrix} ⎣ ⎡ 1 0 0 0 − 3 1 0 0 0 0 0 2 1 − 4 0 1 0 ⎦ ⎤ ⎣ ⎡ 0 2 0 0 ⎦ ⎤
x ⃗ = [ − 6 2 0 0 ] \vec{x} = \begin{bmatrix} -6 \\ 2 \\ 0 \\ 0 \end{bmatrix} x = ⎣ ⎡ − 6 2 0 0 ⎦ ⎤
7) Let A = [ 1 3 2 5 2 6 1 − 2 4 2 6 1 − 2 4 3 9 1 0 9 ] A = \begin{bmatrix} 1 & 3 & 2 & 5 \\ 2 & 6 & 1 & -2 & 4 \\ 2 & 6 & 1 & -2 & 4 \\ 3 & 9 & 1 & 0 & 9\end{bmatrix} A = ⎣ ⎡ 1 2 2 3 3 6 6 9 2 1 1 1 5 − 2 − 2 0 4 4 9 ⎦ ⎤ . (Suppose we already know rref ( A ) = [ 1 3 2 5 0 0 1 − 6 − 6 0 0 0 0 ] \text{rref}\left( A \right) = \begin{bmatrix} 1 & 3 & 2 & 5 \\ 0 & 0 & 1 & -6 & -6 \\ 0 & 0 & 0 & 0 \end{bmatrix} rref ( A ) = ⎣ ⎡ 1 0 0 3 0 0 2 1 0 5 − 6 0 − 6 ⎦ ⎤ ).
a) Find vectors that span the kernel of A A A . Show your work
Solution
x 1 = − 3 t − 2 r − 5 s x_1 = -3t - 2r - 5s x 1 = − 3 t − 2 r − 5 s
x 2 = t x_2 = t x 2 = t
x 3 = 6 r + 6 s x_3 = 6r + 6s x 3 = 6 r + 6 s
x 4 = r x_4 = r x 4 = r
x 5 = s x_5 = s x 5 = s
[ − 3 t − 2 r − 5 s t 6 r + 6 s r s ] = t [ − 3 1 0 0 0 ] + r [ − 2 0 6 1 0 ] + s [ − 5 0 6 0 1 ] \begin{bmatrix}
-3t-2r-5s \\
t \\
6r + 6s \\
r \\
s
\end{bmatrix}
=
t \begin{bmatrix}
-3 \\ 1 \\ 0 \\ 0 \\ 0
\end{bmatrix}
+ r \begin{bmatrix} -2 \\ 0 \\ 6 \\ 1 \\0 \end{bmatrix}
+ s \begin{bmatrix} -5 \\ 0 \\ 6 \\ 0 \\1 \end{bmatrix} ⎣ ⎡ − 3 t − 2 r − 5 s t 6 r + 6 s r s ⎦ ⎤ = t ⎣ ⎡ − 3 1 0 0 0 ⎦ ⎤ + r ⎣ ⎡ − 2 0 6 1 0 ⎦ ⎤ + s ⎣ ⎡ − 5 0 6 0 1 ⎦ ⎤
Answer: [ − 3 1 0 0 0 ] \begin{bmatrix} -3 \\ 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} ⎣ ⎡ − 3 1 0 0 0 ⎦ ⎤ , [ − 2 0 6 1 0 ] \begin{bmatrix} -2 \\ 0 \\ 6 \\ 1 \\ 0 \end{bmatrix} ⎣ ⎡ − 2 0 6 1 0 ⎦ ⎤ , [ − 5 0 6 0 1 ] \begin{bmatrix} -5 \\ 0 \\ 6 \\ 0 \\ 1 \end{bmatrix} ⎣ ⎡ − 5 0 6 0 1 ⎦ ⎤
b) Find vectors that span the image of A A A
Solution
[ 1 2 3 ] \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} ⎣ ⎡ 1 2 3 ⎦ ⎤ , [ 0 1 1 ] \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} ⎣ ⎡ 0 1 1 ⎦ ⎤
8) True or false.
a) If A A A is an n × n n\times n n × n matrix and A 4 = A A^{4} = A A 4 = A , then A 3 = I n A^{3} = I_n A 3 = I n .
Solution
A = [ 0 0 0 0 ] A= \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} A = [ 0 0 0 0 ]
A 4 = A A^{4} = A A 4 = A and A 3 ≠ I 2 A^{3}\neq I_2 A 3 = I 2
False
b) If v ⃗ \vec{v} v and w ⃗ \vec{w} w in R n \mathbb{R}^{n} R n are solutions of A x ⃗ = b ⃗ A\vec{x}=\vec{b} A x = b , where b ⃗ ≠ 0 ⃗ \vec{b} \neq \vec{0} b = 0 . Then v ⃗ + w ⃗ \vec{v}+\vec{w} v + w is also a solution for A x ⃗ = b ⃗ A\vec{x}= \vec{b} A x = b .
Solution
A v ⃗ = b ⃗ A\vec{v} = \vec{b} A v = b and A w ⃗ = b ⃗ A\vec{w}= \vec{b} A w = b where b ⃗ ≠ 0 ⃗ \vec{b}\neq \vec{0} b = 0
A ( v ⃗ + w ⃗ ) = A v ⃗ + A w ⃗ = b ⃗ + b ⃗ = 2 b ⃗ ≠ b ⃗ A\left( \vec{v} + \vec{w} \right) = A\vec{v} + A\vec{w} = \vec{b} + \vec{b} = 2\vec{b} \neq \vec{b} A ( v + w ) = A v + A w = b + b = 2 b = b and b ⃗ ≠ 0 ⃗ \vec{b}\neq \vec{0} b = 0
False
d) There exists a rank 2 matrix A A A with A [ 1 − 7 ] = [ 2 − 1 0 ] A \begin{bmatrix} 1 \\ -7 \end{bmatrix} = \begin{bmatrix} 2 \\ -1 \\ 0 \end{bmatrix} A [ 1 − 7 ] = ⎣ ⎡ 2 − 1 0 ⎦ ⎤ .
Solution
A [ 1 − 7 ] = [ 2 − 1 0 ] A \begin{bmatrix} 1 \\ -7 \end{bmatrix} = \begin{bmatrix} 2 \\ -1 \\ 0 \end{bmatrix} A [ 1 − 7 ] = ⎣ ⎡ 2 − 1 0 ⎦ ⎤ .
[ 2 0 0 1 7 0 0 ] [ 1 − 7 ] = [ 2 − 1 0 ] \begin{bmatrix}
2 & 0 \\
0 & \frac{1}{7}\\
0 & 0
\end{bmatrix}
\begin{bmatrix}
1 \\ -7
\end{bmatrix}
=
\begin{bmatrix}
2 \\ -1 \\ 0
\end{bmatrix} ⎣ ⎡ 2 0 0 0 7 1 0 ⎦ ⎤ [ 1 − 7 ] = ⎣ ⎡ 2 − 1 0 ⎦ ⎤
True
e) For any 6 × 2 6\times 2 6 × 2 matrix A A A the system A x ⃗ = 0 ⃗ A\vec{x} = \vec{0} A x = 0 is consistent
Solution
For any n × m n\times m n × m matrix A A A , A x ⃗ = 0 ⃗ A\vec{x}=\vec{0} A x = 0 is consistent. (A 0 ⃗ = 0 ⃗ A\vec{0} = \vec{0} A 0 = 0 )
5.1 Orthogonal Projections and Orthonormal Bases 5.1 Orthogonal Projections and Orthonormal Bases
Recall : Geometry of Vectors
v ⃗ \vec{v} v , w ⃗ \vec{w} w in R n \mathbb{R}^{n} R n are orthogonal provided they are perpendicular (v ⃗ ⋅ w ⃗ = 0 \vec{v}\cdot \vec{w} = 0 v ⋅ w = 0 )
The length of v ⃗ \vec{v} v is ∣ ∣ v ⃗ ∣ ∣ = v ⃗ ⋅ v ⃗ \mid \mid \vec{v} \mid \mid = \sqrt{\vec{v} \cdot \vec{v}} ∣∣ v ∣∣= v ⋅ v . Note ∣ ∣ v ⃗ ∣ ∣ 2 = v ⃗ ⋅ v ⃗ \mid \mid \vec{v} \mid \mid ^{2} = \vec{v}\cdot \vec{v} ∣∣ v ∣ ∣ 2 = v ⋅ v
Distance between v ⃗ \vec{v} v and w ⃗ \vec{w} w in R n \mathbb{R}^{n} R n is ∣ ∣ v ⃗ − w ⃗ ∣ ∣ \mid \mid \vec{v} - \vec{w} \mid \mid ∣∣ v − w ∣∣ (this is used in section 5.4).
Geometry and the dot product v ⃗ ⋅ w ⃗ = ∣ ∣ v ⃗ ∣ ∣ ⋅ ∣ ∣ w ⃗ ∣ ∣ cos ( θ ) \vec{v} \cdot \vec{w} = \mid \mid \vec{v} \mid \mid \cdot \mid \mid \vec{w} \mid \mid \cos \left( \theta \right) v ⋅ w =∣∣ v ∣∣ ⋅ ∣∣ w ∣∣ cos ( θ ) where θ \theta θ is the angle between v ⃗ \vec{v} v and w ⃗ \vec{w} w (0 ≤ θ ≤ π 0 \le \theta \le \pi 0 ≤ θ ≤ π ).
For v ⃗ \vec{v} v , w ⃗ \vec{w} w , nonzero in R n \mathbb{R}^{n} R n , the angle between v ⃗ \vec{v} v and w ⃗ \vec{w} w is θ = cos − 1 ( v ⃗ ⋅ w ⃗ ∣ ∣ v ⃗ ∣ ∣ ∣ ∣ w ⃗ ∣ ∣ ) \theta = \cos ^{-1} \left( \frac{\vec{v}\cdot \vec{w}}{ \mid \mid \vec{v} \mid \mid \mid \mid \vec{w} \mid \mid } \right) θ = cos − 1 ( ∣∣ v ∣∣∣∣ w ∣∣ v ⋅ w ) (Note that the range of cos − 1 ( ⋯ ) \cos ^{-1} (\cdots ) cos − 1 ( ⋯ ) is [ 0 , π ] [0,\ \pi] [ 0 , π ] )
Example
v ⃗ = [ 2 0 2 ] \vec{v} = \begin{bmatrix} 2 \\ 0 \\ 2 \end{bmatrix} v = ⎣ ⎡ 2 0 2 ⎦ ⎤ and w ⃗ = [ 1 1 0 ] \vec{w} = \begin{bmatrix} 1 \\ 1\\ 0 \end{bmatrix} w = ⎣ ⎡ 1 1 0 ⎦ ⎤
1) Find the angle between v ⃗ \vec{v} v and w ⃗ \vec{w} w .
2) Find the distance between v ⃗ \vec{v} v and w ⃗ \vec{w} w .
Solution
1)
v ⃗ ⋅ w ⃗ = 2 + 0 + 0 = 2 \vec{v} \cdot \vec{w} = 2 + 0 + 0 = 2 v ⋅ w = 2 + 0 + 0 = 2
∣ ∣ v ⃗ ∣ ∣ = 4 + 4 = 2 2 \mid \mid \vec{v} \mid \mid = \sqrt{4 + 4} = 2 \sqrt{2} ∣∣ v ∣∣= 4 + 4 = 2 2
∣ ∣ w ⃗ ∣ ∣ = 1 + 1 = 2 \mid \mid \vec{w} \mid \mid = \sqrt{1 + 1} = \sqrt{2} ∣∣ w ∣∣= 1 + 1 = 2
θ = cos − 1 ( 2 2 2 ( 2 ) ) = cos − 1 ( 1 2 ) \theta = \cos ^{-1} \left( \frac{2}{2\sqrt{2} \left( \sqrt{2} \right) } \right) = \cos ^{-1} \left( \frac{1}{2} \right) θ = cos − 1 ( 2 2 ( 2 ) 2 ) = cos − 1 ( 2 1 )
∴ θ = π 3 \therefore \theta = \frac{\pi}{3} ∴ θ = 3 π
2)
v ⃗ − w ⃗ = [ 1 − 1 2 ] \vec{v} - \vec{w} = \begin{bmatrix} 1 \\ -1 \\ 2 \end{bmatrix} v − w = ⎣ ⎡ 1 − 1 2 ⎦ ⎤
∣ ∣ v ⃗ − w ⃗ ∣ ∣ = 1 + 1 + 4 = 6 \mid \mid \vec{v} - \vec{w} \mid \mid = \sqrt{1 + 1 + 4} = \sqrt{6} ∣∣ v − w ∣∣= 1 + 1 + 4 = 6
Remark : For v ⃗ \vec{v} v and w ⃗ \vec{w} w in R n \mathbb{R}^{n} R n , v ⃗ \vec{v} v and w ⃗ \vec{w} w are orthogonal if and only if ∣ ∣ v ⃗ + w ⃗ ∣ ∣ 2 = ∣ ∣ v ⃗ ∣ ∣ 2 + ∣ ∣ w ⃗ ∣ ∣ 2 \mid \mid \vec{v} + \vec{w} \mid \mid ^{2} = \mid \mid \vec{v} \mid \mid ^{2} + \mid \mid \vec{w} \mid \mid ^{2} ∣∣ v + w ∣ ∣ 2 =∣∣ v ∣ ∣ 2 + ∣∣ w ∣ ∣ 2
c 2 = a 2 + b 2 c^{2} = a^{2} + b^{2} c 2 = a 2 + b 2
Definition:
Vectors { u ⃗ 1 , u ⃗ 2 , ⋯ , u ⃗ m } \{ \vec{u} _{1}, \vec{u} _{2}, \cdots , \vec{u} _{m} \} { u 1 , u 2 , ⋯ , u m } in R n \mathbb{R}^{n} R n form an orthonormal collection of vectors provided
Each vectors u ⃗ i \vec{u}_i u i is unit. ∣ ∣ u ⃗ i ∣ ∣ = 1 \mid \mid \vec{u}_i \mid \mid = 1 ∣∣ u i ∣∣= 1 or u ⃗ j ⋅ u ⃗ i = 1 \vec{u}_j \cdot \vec{u}_i = 1 u j ⋅ u i = 1
Vectors are pairwise orthogonal
{ u ⃗ 1 , u ⃗ 2 , ⋯ , u ⃗ m } \{ \vec{u}_1, \vec{u}_2, \cdots , \vec{u}_m \} { u 1 , u 2 , ⋯ , u m } are orthonormal if and only if u ⃗ i ⋅ u ⃗ j = { 0 i ≠ j 1 i = j \vec{u}_i \cdot \vec{u}_j = \begin{cases} 0 & i \neq j \\ 1 & i =j\end{cases} u i ⋅ u j = { 0 1 i = j i = j
Example
In R 3 \mathbb{R}^{3} R 3 , { e ⃗ 1 , e ⃗ 2 , e ⃗ 3 } \{ \vec{e}_1 , \vec{e}_2 , \vec{e}_3 \} { e 1 , e 2 , e 3 } and { [ 2 2 0 2 2 ] , [ − 2 2 0 2 2 ] } \{ \begin{bmatrix} \frac{\sqrt{2} }{2} \\ 0 \\ \frac{\sqrt{2} }{2} \end{bmatrix} , \begin{bmatrix} -\frac{\sqrt{2} }{2} \\ 0 \\ \frac{\sqrt{2} }{2} \end{bmatrix} \} { ⎣ ⎡ 2 2 0 2 2 ⎦ ⎤ , ⎣ ⎡ − 2 2 0 2 2 ⎦ ⎤ }
u ⃗ 1 ⋅ u ⃗ 2 = 0 \vec{u}_1 \cdot \vec{u}_2 = 0 u 1 ⋅ u 2 = 0
u ⃗ i ⋅ u ⃗ i = ( 2 2 ) 2 + ( 2 2 ) 2 = 1 2 + 1 2 = 1 \vec{u}_i \cdot \vec{u}_i = \left( \frac{\sqrt{2} }{2} \right) ^{2} + \left( \frac{\sqrt{2} }{2} \right) ^{2} = \frac{1}{2} + \frac{1}{2} = 1 u i ⋅ u i = ( 2 2 ) 2 + ( 2 2 ) 2 = 2 1 + 2 1 = 1
Theorem : Orthonormal vectors are linearly independent.
Proof: Suppose { u ⃗ 1 , u ⃗ 2 , ⋯ , u ⃗ m } \{ \vec{u}_1 , \vec{u}_2, \cdots , \vec{u}_m \} { u 1 , u 2 , ⋯ , u m } are orthonormal and c 1 u ⃗ 1 + v 2 u ⃗ 2 + ⋯ + c m u ⃗ m = 0 ⃗ c_1 \vec{u}_1 + v_2 \vec{u}_2 + \cdots + c_m \vec{u}_m = \vec{0} c 1 u 1 + v 2 u 2 + ⋯ + c m u m = 0 . Show c 1 = c 2 = ⋯ = c m = 0 c_1 = c_2 = \cdots = c_m = 0 c 1 = c 2 = ⋯ = c m = 0
Fix i: Show c i = 0 c_{i} = 0 c i = 0 :
u ⃗ i ⋅ ( c 1 u ⃗ 1 + c 2 u ⃗ 2 + ⋯ + c m u ⃗ m ) = u ⃗ i ⋅ 0 ⃗ = 0 \vec{u}_i \cdot \left( c_1 \vec{u}_1 + c_2 \vec{u}_2 + \cdots + c_m \vec{u}_m \right) = \vec{u}_i \cdot \vec{0} = 0 u i ⋅ ( c 1 u 1 + c 2 u 2 + ⋯ + c m u m ) = u i ⋅ 0 = 0
Rewrite LHS
c 1 ( u ⃗ i ⋅ u ⃗ 1 ) + c 2 ( u ⃗ i ⋅ u ⃗ 2 ) + ⋯ + c 1 ( u ⃗ i ⋅ u ⃗ i ) + ⋯ + c m ( u ⃗ i ⋅ u ⃗ m ) = 0 c_1 \left( \vec{u}_i \cdot \vec{u}_1 \right) + c_2 \left( \vec{u}_i \cdot \vec{u}_2 \right) + \cdots + c_1 \left( \vec{u}_i \cdot \vec{u}_i \right) + \cdots + c_m \left( \vec{u}_i \cdot \vec{u}_m \right) = 0 c 1 ( u i ⋅ u 1 ) + c 2 ( u i ⋅ u 2 ) + ⋯ + c 1 ( u i ⋅ u i ) + ⋯ + c m ( u i ⋅ u m ) = 0
We get: c i ⋅ 1 = 0 c_i \cdot 1 = 0 c i ⋅ 1 = 0 . Therefore c i = 0 c_i = 0 c i = 0 .
Therefore, c 1 = c 2 = c 3 = ⋯ = c m = 0 c_1 = c_2 = c_3 = \cdots = c_m = 0 c 1 = c 2 = c 3 = ⋯ = c m = 0
Note: Really just needed orthogonal and nonzero.
A collection { u ⃗ 1 , u ⃗ 2 , ⋯ , u ⃗ n } \{ \vec{u}_1 , \vec{u}_2 , \cdots , \vec{u}_n \} { u 1 , u 2 , ⋯ , u n } of orthonormal vectors in R n \mathbb{R}^{n} R n form a basis for R n \mathbb{R}^{n} R n .
dim ( R n ) = n \text{dim}\left( \mathbb{R}^{n} \right) = n dim ( R n ) = n . n n n linearly independent vectors are a basis. This is called an orthonormal basis .
Examples
The columns of the rotational matrix [ 5 13 12 13 − 12 13 5 13 ] \begin{bmatrix} \frac{5}{13} & \frac{12}{13} \\ -\frac{12}{13} & \frac{5}{13} \end{bmatrix} [ 13 5 − 13 12 13 12 13 5 ] form an orthonormal basis for R 2 \mathbb{R}^{2} R 2 .
The columns of the reflection matrix [ − 7 24 − 24 25 − 24 25 7 25 ] \begin{bmatrix} -\frac{7}{24} & -\frac{24}{25} \\ -\frac{24}{25} & \frac{7}{25} \end{bmatrix} [ − 24 7 − 25 24 − 25 24 25 7 ] form an orthonormal basis for R 2 \mathbb{R}^{2} R 2 .
Given an orthogonal basis, we may normalize the vectors to obtain an orthonormal basis.
Example
Normalize the basis for R 3 \mathbb{R}^{3} R 3 : { [ 1 2 1 ] , [ − 2 1 0 ] , [ 3 6 − 15 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}, \begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 3 \\ 6 \\ -15 \end{bmatrix} \} { ⎣ ⎡ 1 2 1 ⎦ ⎤ , ⎣ ⎡ − 2 1 0 ⎦ ⎤ , ⎣ ⎡ 3 6 − 15 ⎦ ⎤ } .
∣ ∣ v ⃗ 1 ∣ ∣ = 1 + 4 + 1 = 6 \mid \mid \vec{v}_1 \mid \mid = \sqrt{1+4+1} = \sqrt{6} ∣∣ v 1 ∣∣= 1 + 4 + 1 = 6
∣ ∣ v ⃗ 2 ∣ ∣ = 4 + 1 = 5 \mid \mid \vec{v}_2 \mid \mid = \sqrt{4 + 1} = \sqrt{5} ∣∣ v 2 ∣∣= 4 + 1 = 5
∣ ∣ v ⃗ 3 ∣ ∣ = 9 + 36 + 225 = 270 = 3 30 \mid \mid \vec{v}_3 \mid \mid = \sqrt{9 + 36 + 225} = \sqrt{270} = 3 \sqrt{30} ∣∣ v 3 ∣∣= 9 + 36 + 225 = 270 = 3 30
{ [ 1 6 2 6 1 6 ] , [ − 2 5 1 5 0 ] , [ 1 30 2 30 − 5 30 ] } \{ \begin{bmatrix} \frac{1}{\sqrt{6} } \\ \frac{2}{\sqrt{6} } \\ \frac{1}{\sqrt{6} } \end{bmatrix} , \begin{bmatrix} -\frac{2}{\sqrt{5} } \\ \frac{1}{\sqrt{5} }\\ 0 \end{bmatrix} , \begin{bmatrix} \frac{1}{\sqrt{30} }\\ \frac{2}{\sqrt{30} }\\ -\frac{5}{\sqrt{30} } \end{bmatrix} \} { ⎣ ⎡ 6 1 6 2 6 1 ⎦ ⎤ , ⎣ ⎡ − 5 2 5 1 0 ⎦ ⎤ , ⎣ ⎡ 30 1 30 2 − 30 5 ⎦ ⎤ }
Orthogonal Projections : Recall: If L = span { w ⃗ } L = \text{span} \{ \vec{w} \} L = span { w } where w ⃗ ≠ 0 ⃗ \vec{w}\neq \vec{0} w = 0 in R n \mathbb{R}^{n} R n .
The orthogonal projection of x ⃗ \vec{x} x onto L L L is proj L ( x ⃗ ) = x ⃗ ∥ = ( x ⃗ ⋅ w ⃗ w ⃗ ⋅ w ⃗ ) w ⃗ \text{proj}_{L}\left( \vec{x} \right) = \vec{x}^{\parallel} = \left( \frac{\vec{x}\cdot \vec{w}}{\vec{w} \cdot \vec{w}} \right) \vec{w} proj L ( x ) = x ∥ = ( w ⋅ w x ⋅ w ) w
The component of x ⃗ \vec{x} x orthogonal to L L L is x ⃗ ⊥ = x ⃗ − x ⃗ ∥ = x ⃗ − proj L ( x ⃗ ) \vec{x}^{\bot} = \vec{x} - \vec{x}^{\parallel} = \vec{x} - \text{proj}_{L} \left( \vec{x} \right) x ⊥ = x − x ∥ = x − proj L ( x )
Note: If L = span { x ⃗ } L = \text{span}\{ \vec{x} \} L = span { x } where u ⃗ \vec{u} u is unit, then proj L ( x ⃗ ) = ( x ⃗ ⋅ u ⃗ ) u ⃗ \text{proj}_{L}\left( \vec{x} \right) = \left( \vec{x}\cdot \vec{u} \right) \vec{u} proj L ( x ) = ( x ⋅ u ) u .
Orthogonal Projection onto a subspace V V V of R n \mathbb{R}^n R n .
Let x ⃗ \vec{x} x be in R n \mathbb{R}^{n} R n and V V V a subspace of R n \mathbb{R}^{n} R n . We may write x ⃗ = x ⃗ ⊥ + x ⃗ ∥ \vec{x} = \vec{x}^{\bot} + \vec{x}^{\parallel} x = x ⊥ + x ∥ where x ⃗ ∥ = proj V ( x ⃗ ) \vec{x}^{\parallel} = \text{proj}_V \left( \vec{x} \right) x ∥ = proj V ( x ) is in V V V .
Suppose { u ⃗ 1 , u ⃗ 2 , ⋯ , u ⃗ m } \{ \vec{u}_1, \vec{u}_2 , \cdots , \vec{u}_m \} { u 1 , u 2 , ⋯ , u m } is an orthonormal basis for V V V then proj V ( x ⃗ ) = ( x ⃗ ⋅ u ⃗ 1 ) u ⃗ 1 + ( x ⃗ ⋅ u ⃗ 2 ) u ⃗ 2 + ⋯ + ( x ⃗ ⋅ u ⃗ m ) u ⃗ m \text{proj}_V \left( \vec{x} \right) = \left( \vec{x} \cdot \vec{u}_1 \right) \vec{u}_1 + \left( \vec{x} \cdot \vec{u}_2 \right) \vec{u}_2 + \cdots + \left( \vec{x} \cdot \vec{u}_m \right) \vec{u}_m proj V ( x ) = ( x ⋅ u 1 ) u 1 + ( x ⋅ u 2 ) u 2 + ⋯ + ( x ⋅ u m ) u m
Example
Find the orthogonal projection of e ⃗ 1 \vec{e}_1 e 1 onto the subspace V V V of R 4 \mathbb{R}^{4} R 4 spanned by { [ 1 1 1 1 ] , [ 1 1 − 1 − 1 ] , [ 1 − 1 − 1 1 ] } \{ \begin{bmatrix} 1 \\ 1\\ 1 \\ 1 \end{bmatrix} , \begin{bmatrix} 1 \\ 1 \\ -1 \\ -1 \end{bmatrix} , \begin{bmatrix} 1 \\ -1 \\ -1 \\ 1 \end{bmatrix} \} { ⎣ ⎡ 1 1 1 1 ⎦ ⎤ , ⎣ ⎡ 1 1 − 1 − 1 ⎦ ⎤ , ⎣ ⎡ 1 − 1 − 1 1 ⎦ ⎤ } .
∣ ∣ v ⃗ i ∣ ∣ = 1 + 1 + 1 + 1 = 2 \mid \mid \vec{v}_i \mid \mid = \sqrt{1 + 1 + 1 + 1} = 2 ∣∣ v i ∣∣= 1 + 1 + 1 + 1 = 2
proj V ( e ⃗ 1 ) = ( u ⃗ 1 ⋅ e ⃗ 1 ) u ⃗ 1 + ( u ⃗ 2 ⋅ e ⃗ 1 ) u ⃗ 2 + ( u ⃗ 3 ⋅ e ⃗ 1 ) u ⃗ 3 \text{proj}_V \left( \vec{e}_1 \right) = \left( \vec{u}_1 \cdot \vec{e}_1 \right) \vec{u}_1 + \left( \vec{u}_2 \cdot \vec{e}_1 \right) \vec{u}_2 + \left( \vec{u}_3 \cdot \vec{e}_1 \right) \vec{u}_3 proj V ( e 1 ) = ( u 1 ⋅ e 1 ) u 1 + ( u 2 ⋅ e 1 ) u 2 + ( u 3 ⋅ e 1 ) u 3
= 1 2 [ 1 2 1 2 1 2 1 2 ] + 1 2 [ 1 2 1 2 − 1 2 − 1 2 ] + 1 2 [ 1 2 − 1 2 − 1 2 1 2 ] = [ 3 4 1 4 − 1 4 1 4 ] = \frac{1}{2} \begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} + \frac{1}{2} \begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ -\frac{1}{2} \\ -\frac{1}{2} \end{bmatrix} + \frac{1}{2} \begin{bmatrix} \frac{1}{2} \\ -\frac{1}{2} \\ -\frac{1}{2} \\ \frac{1}{2} \end{bmatrix} = \begin{bmatrix} \frac{3}{4} \\ \frac{1}{4} \\ -\frac{1}{4} \\ \frac{1}{4} \end{bmatrix} = 2 1 ⎣ ⎡ 2 1 2 1 2 1 2 1 ⎦ ⎤ + 2 1 ⎣ ⎡ 2 1 2 1 − 2 1 − 2 1 ⎦ ⎤ + 2 1 ⎣ ⎡ 2 1 − 2 1 − 2 1 2 1 ⎦ ⎤ = ⎣ ⎡ 4 3 4 1 − 4 1 4 1 ⎦ ⎤ in V V V
Note: e ⃗ 1 ⊥ = e ⃗ 1 − proj V ( e ⃗ 1 ) \vec{e}_1^{\bot} = \vec{e}_1 - \text{proj}_V \left( \vec{e}_1 \right) e 1 ⊥ = e 1 − proj V ( e 1 )
= [ 1 0 0 0 ] − [ 3 4 1 4 − 1 4 1 4 ] = [ 1 4 − 1 4 1 4 − 1 4 ] = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} - \begin{bmatrix} \frac{3}{4} \\ \frac{1}{4} \\ -\frac{1}{4} \\ \frac{1}{4} \end{bmatrix} = \begin{bmatrix} \frac{1}{4} \\ -\frac{1}{4} \\ \frac{1}{4} \\ -\frac{1}{4} \end{bmatrix} = ⎣ ⎡ 1 0 0 0 ⎦ ⎤ − ⎣ ⎡ 4 3 4 1 − 4 1 4 1 ⎦ ⎤ = ⎣ ⎡ 4 1 − 4 1 4 1 − 4 1 ⎦ ⎤
This is orthogonal to u ⃗ 1 \vec{u}_1 u 1 , u ⃗ 2 \vec{u}_2 u 2 , u ⃗ 3 \vec{u}_3 u 3 and every vector in V V V .
Note: if x ⃗ \vec{x} x is in V V V then proj V ( x ⃗ ) = x ⃗ \text{proj}_V \left( \vec{x} \right) = \vec{x} proj V ( x ) = x
Example
x ⃗ = [ 1 1 0 0 ] \vec{x} = \begin{bmatrix} 1 \\ 1 \\ 0 \\ 0 \end{bmatrix} x = ⎣ ⎡ 1 1 0 0 ⎦ ⎤ is in V = span { [ 1 1 1 1 ] , [ 1 1 − 1 − 1 ] , [ 1 − 1 − 1 1 ] } V = \text{span} \{ \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} , \begin{bmatrix} 1 \\ 1 \\ -1 \\ -1 \end{bmatrix} , \begin{bmatrix} 1 \\ -1 \\ - 1\\ 1 \end{bmatrix} \} V = span { ⎣ ⎡ 1 1 1 1 ⎦ ⎤ , ⎣ ⎡ 1 1 − 1 − 1 ⎦ ⎤ , ⎣ ⎡ 1 − 1 − 1 1 ⎦ ⎤ } . Show proj V ( x ⃗ ) = x ⃗ \text{proj}_V \left( \vec{x} \right) = \vec{x} proj V ( x ) = x .
proj V ( x ⃗ ) = ( x ⃗ ⋅ u ⃗ 1 ) u ⃗ 1 + ( x ⃗ ⋅ u ⃗ 2 ) u ⃗ 2 + ( x ⃗ ⋅ u ⃗ 3 ) \text{proj}_V \left( \vec{x} \right) = \left( \vec{x} \cdot \vec{u}_1 \right) \vec{u}_1 + \left( \vec{x} \cdot \vec{u}_2 \right) \vec{u}_2 + \left( \vec{x} \cdot \vec{u}_3 \right) proj V ( x ) = ( x ⋅ u 1 ) u 1 + ( x ⋅ u 2 ) u 2 + ( x ⋅ u 3 )
= 1 [ 1 2 1 2 1 2 1 2 ] + 1 [ 1 2 1 2 − 1 2 − 1 2 ] + 0 [ 1 2 − 1 2 − 1 2 1 2 ] = [ 1 1 0 0 ] = 1 \begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} + 1 \begin{bmatrix} \frac{1}{2}\\ \frac{1}{2} \\ \frac{-1}{2} \\ -\frac{1}{2} \end{bmatrix} + 0 \begin{bmatrix} \frac{1}{2} \\ -\frac{1}{2} \\ -\frac{1}{2} \\ \frac{1}{2} \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \\ 0 \\ 0 \end{bmatrix} = 1 ⎣ ⎡ 2 1 2 1 2 1 2 1 ⎦ ⎤ + 1 ⎣ ⎡ 2 1 2 1 2 − 1 − 2 1 ⎦ ⎤ + 0 ⎣ ⎡ 2 1 − 2 1 − 2 1 2 1 ⎦ ⎤ = ⎣ ⎡ 1 1 0 0 ⎦ ⎤
{ [ 1 2 1 2 1 2 1 2 ] , [ 1 2 1 2 − 1 2 − 1 2 ] , [ 1 2 − 1 2 − 1 2 1 2 ] } \{ \begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} , \begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ -\frac{1}{2} \\ -\frac{1}{2} \end{bmatrix} , \begin{bmatrix} \frac{1}{2} \\ -\frac{1}{2} \\ -\frac{1}{2} \\ \frac{1}{2} \end{bmatrix} \} { ⎣ ⎡ 2 1 2 1 2 1 2 1 ⎦ ⎤ , ⎣ ⎡ 2 1 2 1 − 2 1 − 2 1 ⎦ ⎤ , ⎣ ⎡ 2 1 − 2 1 − 2 1 2 1 ⎦ ⎤ }
An Application of Orthogonal Projection : Recall: If { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ 3 } \{ \vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_3 \} { v 1 , v 2 , ⋯ , v 3 } is a basis for R n \mathbb{R}^{n} R n then any vector v ⃗ \vec{v} v in R n \mathbb{R}^{n} R n can be expressed uniquely as a linear combination of { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ n } \{ \vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_n \} { v 1 , v 2 , ⋯ , v n } .
When β = { u ⃗ 1 , u ⃗ 2 , ⋯ , u ⃗ n } \beta = \{ \vec{u}_1 , \vec{u}_2 , \cdots , \vec{u}_n \} β = { u 1 , u 2 , ⋯ , u n } is an orthonormal basis for R n \mathbb{R}^{n} R n , we can easily write x ⃗ \vec{x} x as linear combination of { u ⃗ 1 , ⋯ , u ⃗ n } \{ \vec{u}_1 , \cdots , \vec{u}_n \} { u 1 , ⋯ , u n }
x ⃗ = ( x ⃗ ⋅ u ⃗ 1 ) u ⃗ 1 + ( x ⃗ ⋅ u ⃗ 2 ) u ⃗ 2 + ⋯ + ( x ⃗ ⋅ u ⃗ n ) u ⃗ n \vec{x} = \left( \vec{x} \cdot \vec{u}_1 \right) \vec{u}_1 + \left( \vec{x} \cdot \vec{u}_2 \right) \vec{u}_2 + \cdots + \left( \vec{x} \cdot \vec{u}_n \right) \vec{u}_n x = ( x ⋅ u 1 ) u 1 + ( x ⋅ u 2 ) u 2 + ⋯ + ( x ⋅ u n ) u n
called coordinates of x ⃗ \vec{x} x relative to basis β \beta β
Example
β = { [ 1 6 2 6 1 6 ] , [ − 2 5 1 5 0 ] , [ 1 30 2 30 − 5 30 ] } \beta = \{ \begin{bmatrix} \frac{1}{\sqrt{6} } \\ \frac{2}{\sqrt{6} } \\ \frac{1}{\sqrt{6} } \end{bmatrix} , \begin{bmatrix} -\frac{2}{\sqrt{5} } \\ \frac{1}{\sqrt{5} } \\ 0 \end{bmatrix} , \begin{bmatrix} \frac{1}{\sqrt{30} } \\ \frac{2}{\sqrt{30} } \\ -\frac{5}{\sqrt{30} } \end{bmatrix} \} β = { ⎣ ⎡ 6 1 6 2 6 1 ⎦ ⎤ , ⎣ ⎡ − 5 2 5 1 0 ⎦ ⎤ , ⎣ ⎡ 30 1 30 2 − 30 5 ⎦ ⎤ } . Find the coordinates of x ⃗ = [ 1 2 3 ] \vec{x} = \begin{bmatrix} 1 \\ 2 \ 3 \end{bmatrix} x = [ 1 2 3 ] relative to β \beta β .
x ⃗ ⋅ u ⃗ 1 = 1 + 4 + 3 6 = 8 6 \vec{x} \cdot \vec{u}_1 = \frac{1+4+3}{\sqrt{6} } = \frac{8}{\sqrt{6} } x ⋅ u 1 = 6 1 + 4 + 3 = 6 8
x ⃗ ⋅ u ⃗ 2 = − 2 + 2 5 = 0 \vec{x} \cdot \vec{u}_2 = \frac{-2 + 2}{\sqrt{5} } = 0 x ⋅ u 2 = 5 − 2 + 2 = 0
x ⃗ ⋅ u ⃗ 3 = 1 + 4 − 15 30 = − 10 30 \vec{x}\cdot \vec{u}_3 = \frac{1+4 - 15}{\sqrt{30} } = -\frac{10}{\sqrt{30}} x ⋅ u 3 = 30 1 + 4 − 15 = − 30 10
x ⃗ = 8 6 u ⃗ 1 − 10 30 u ⃗ 3 \vec{x} = \frac{8}{\sqrt{6} } \vec{u}_1 - \frac{10}{\sqrt{30} } \vec{u}_3 x = 6 8 u 1 − 30 10 u 3
Note: v ⃗ 1 \vec{v}_1 v 1 , v ⃗ 2 \vec{v}_2 v 2 , v ⃗ 3 \vec{v}_3 v 3 form an orthonormal basis for R 3 \mathbb{R}^{3} R 3
Exercise : Express x ⃗ = [ 3 2 1 ] \vec{x} = \begin{bmatrix} 3\\ 2\\ 1 \end{bmatrix} x = ⎣ ⎡ 3 2 1 ⎦ ⎤ as a linear combination of v ⃗ 1 = [ − 3 5 4 5 0 ] \vec{v}_1 = \begin{bmatrix} -\frac{3}{5} \\ \frac{4}{5} \\ 0 \end{bmatrix} v 1 = ⎣ ⎡ − 5 3 5 4 0 ⎦ ⎤ , v ⃗ 2 = [ 4 5 3 5 0 ] \vec{v}_2 = \begin{bmatrix} \frac{4}{5} \\ \frac{3}{5} \\ 0 \end{bmatrix} v 2 = ⎣ ⎡ 5 4 5 3 0 ⎦ ⎤ , and v ⃗ 3 = [ 0 0 1 ] \vec{v}_3 = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} v 3 = ⎣ ⎡ 0 0 1 ⎦ ⎤ .
x ⃗ ⋅ v ⃗ 1 = − 9 + 8 5 = − 1 5 \vec{x}\cdot \vec{v}_1 = \frac{-9+8}{5} = -\frac{1}{5} x ⋅ v 1 = 5 − 9 + 8 = − 5 1
x ⃗ ⋅ v ⃗ 2 = 12 + 6 5 = 18 5 \vec{x}\cdot \vec{v}_2 = \frac{12+6}{5} = \frac{18}{5} x ⋅ v 2 = 5 12 + 6 = 5 18
x ⃗ ⋅ v ⃗ 3 = 0 + 0 + 1 = 1 \vec{x}\cdot \vec{v}_3 = 0 + 0 + 1 = 1 x ⋅ v 3 = 0 + 0 + 1 = 1
x ⃗ = − 1 5 v ⃗ 1 + 18 5 v ⃗ 2 + v ⃗ 3 \vec{x} = -\frac{1}{5} \vec{v}_1 + \frac{18}{5} \vec{v}_2 + \vec{v}_3 x = − 5 1 v 1 + 5 18 v 2 + v 3
For a subspace V V V of R n \mathbb{R}^{n} R n , the map T : R n → R n T : \mathbb{R}^{n} \to \mathbb{R}^{n} T : R n → R n given by T ( x ⃗ ) = proj V ( x ⃗ ) T\left( \vec{x} \right) = \text{proj}_{V}\left( \vec{x} \right) T ( x ) = proj V ( x ) is a linear transformation!
What is im ( T ) \text{im}\left( T \right) im ( T ) ? im ( T ) = V \text{im}\left( T \right) = V im ( T ) = V
What is ker ( T ) \text{ker}\left( T \right) ker ( T ) ? ker ( T ) = { x ∈ R n : x ⃗ ⋅ v ⃗ = 0 \text{ker}\left( T \right) = \{ x \in \mathbb{R}^{n} : \vec{x} \cdot \vec{v} = 0 ker ( T ) = { x ∈ R n : x ⋅ v = 0 for all v ⃗ ∈ V } \vec{v} \in V \} v ∈ V } . This is called the orthogonal complement of V V V denoted V ⊥ V^{\bot} V ⊥
Theorem: Let V V V be a subspace of R n \mathbb{R}^{n} R n . Then,
V ⊥ V^{\bot} V ⊥ is a subspace of R n \mathbb{R}^{n} R n
V ∩ V ⊥ = { 0 ⃗ } V \cap V^{\bot} = \{ \vec{0} \} V ∩ V ⊥ = { 0 }
dim ( V ) + dim ( V ⊥ ) = n \text{dim}\left( V \right) + \text{dim}\left( V^{\bot} \right) = n dim ( V ) + dim ( V ⊥ ) = n
( V ⊥ ) ⊥ = V \left( V^{\bot} \right)^{\bot} = V ( V ⊥ ) ⊥ = V
Proof:
2) Suppose x ⃗ ∈ V \vec{x} \in V x ∈ V and x ⃗ ∈ V ⊥ \vec{x} \in V^{\bot} x ∈ V ⊥ . Therefore x ⃗ ⋅ x ⃗ = 0 \vec{x}\cdot \vec{x} = 0 x ⋅ x = 0 . x ⃗ = 0 \vec{x} = 0 x = 0
3) Follows from rank nullity theorem
Example
Find a basis from V ⊥ V^{\bot} V ⊥ where V = span { [ 1 3 1 − 1 ] } V = \text{span} \{ \begin{bmatrix} 1 \\ 3 \\ 1 \\ -1 \end{bmatrix} \} V = span { ⎣ ⎡ 1 3 1 − 1 ⎦ ⎤ } .
[ 1 3 1 − 1 ] [ x 1 x 2 x 3 x 4 ] = 0 \begin{bmatrix} 1 & 3 & 1 & -1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = 0 [ 1 3 1 − 1 ] ⎣ ⎡ x 1 x 2 x 3 x 4 ⎦ ⎤ = 0
x 1 = − 3 t − r + s x_1 = -3t - r + s x 1 = − 3 t − r + s
x 2 = t x_2 = t x 2 = t
x 3 = r x_3 = r x 3 = r
x 4 = s x_4 = s x 4 = s
[ − 3 t − r + s t r s ] = t [ − 3 1 0 0 ] + r [ − 1 0 1 0 ] + s [ 1 0 0 1 ] \begin{bmatrix}
-3t - r + s \\
t \\
r \\
s
\end{bmatrix}
=
t \begin{bmatrix}
-3 \\
1 \\
0 \\
0
\end{bmatrix}
+ r
\begin{bmatrix}
-1 \\
0 \\
1 \\
0
\end{bmatrix}
+ s
\begin{bmatrix}
1 \\
0 \\
0 \\
1
\end{bmatrix} ⎣ ⎡ − 3 t − r + s t r s ⎦ ⎤ = t ⎣ ⎡ − 3 1 0 0 ⎦ ⎤ + r ⎣ ⎡ − 1 0 1 0 ⎦ ⎤ + s ⎣ ⎡ 1 0 0 1 ⎦ ⎤
Basis for V ⊥ V^{\bot} V ⊥ :
{ [ − 3 1 0 0 ] , [ − 1 0 1 0 ] , [ 1 0 0 1 ] } \{
\begin{bmatrix}
-3 \\
1 \\
0 \\
0
\end{bmatrix}
,
\begin{bmatrix}
-1 \\
0 \\
1 \\
0
\end{bmatrix}
,
\begin{bmatrix}
1 \\
0 \\
0 \\
1
\end{bmatrix}
\} { ⎣ ⎡ − 3 1 0 0 ⎦ ⎤ , ⎣ ⎡ − 1 0 1 0 ⎦ ⎤ , ⎣ ⎡ 1 0 0 1 ⎦ ⎤ }
Example
Find a basis for V ⊥ V^{\bot} V ⊥ where V = span { [ − 1 2 4 ] , [ 0 3 1 ] } V = \text{span} \{ \begin{bmatrix} -1 \\ 2 \\ 4 \end{bmatrix} , \begin{bmatrix} 0 \\ 3 \\ 1 \end{bmatrix} \} V = span { ⎣ ⎡ − 1 2 4 ⎦ ⎤ , ⎣ ⎡ 0 3 1 ⎦ ⎤ } .
Notice x ⃗ \vec{x} x is in V ⊥ V^{\bot} V ⊥ provided [ − 1 2 4 0 3 1 ] [ x 1 x 2 x 3 ] = [ 0 0 ] \begin{bmatrix} -1 & 2 & 4 \\ 0 & 3 & 1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} [ − 1 0 2 3 4 1 ] ⎣ ⎡ x 1 x 2 x 3 ⎦ ⎤ = [ 0 0 ]
Find a basis for ker [ − 1 2 4 0 3 1 ] \text{ker} \begin{bmatrix} -1 & 2 & 4 \\ 0 & 3 & 1 \end{bmatrix} ker [ − 1 0 2 3 4 1 ]
[ − 1 2 4 0 3 1 ] → [ 1 − 2 − 4 0 1 1 3 ] \begin{bmatrix}
-1 & 2 & 4 \\
0 & 3 & 1
\end{bmatrix}
\to
\begin{bmatrix}
1 & -2 & -4 \\
0 & 1 & \frac{1}{3}
\end{bmatrix} [ − 1 0 2 3 4 1 ] → [ 1 0 − 2 1 − 4 3 1 ]
→ [ 1 0 − 10 3 0 1 1 3 ] \to
\begin{bmatrix}
1 & 0 & \frac{-10}{3} \\
0 & 1 & \frac{1}{3}
\end{bmatrix} → [ 1 0 0 1 3 − 10 3 1 ]
x 3 = t x_3 = t x 3 = t
x 1 = 10 3 t x_1 = \frac{10}{3} t x 1 = 3 10 t
x 2 = − 1 3 t x_2 = -\frac{1}{3} t x 2 = − 3 1 t
[ 10 3 t − 1 3 t t ] \begin{bmatrix} \frac{10}{3}t \\ -\frac{1}{3}t \\ t \end{bmatrix} ⎣ ⎡ 3 10 t − 3 1 t t ⎦ ⎤
Basis: { [ 10 − 1 3 ] } \{ \begin{bmatrix} 10 \\ -1 \\ 3 \end{bmatrix} \} { ⎣ ⎡ 10 − 1 3 ⎦ ⎤ }
Definition:
Comment: Suppose A A A is n × m n \times m n × m .
The row space of A A A , denoted row ( A ) \text{row}\left( A \right) row ( A ) is the span of the rows of A A A in R m \mathbb{R}^{m} R m .
Our above examples illustrate: ker ( A ) = ( row ( A ) ) ⊥ \text{ker}\left( A \right) = \left( \text{row}\left( A \right) \right) ^{\bot} ker ( A ) = ( row ( A ) ) ⊥
Note: dim ( row ( A ) ) = rank ( A ) \text{dim}\left( \text{row}\left( A \right) \right) = \text{rank}\left( A \right) dim ( row ( A ) ) = rank ( A ) .
Example
[ 1 2 3 4 0 1 3 7 0 0 1 0 ] \begin{bmatrix} 1 & 2 & 3 & 4 \\ 0 & 1 & 3 & 7 \\ 0 & 0 & 1 & 0 \end{bmatrix} ⎣ ⎡ 1 0 0 2 1 0 3 3 1 4 7 0 ⎦ ⎤
im ( A ) ∈ R 3 \text{im}\left( A \right) \in \mathbb{R}^{3} im ( A ) ∈ R 3
span ( [ 1 0 0 ] , [ 2 1 0 ] , [ 3 3 1 ] , [ 4 7 0 ] ) \text{span}\left( \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 2 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 3 \\ 3 \\ 1 \end{bmatrix} , \begin{bmatrix} 4 \\ 7 \\ 0 \end{bmatrix} \right) span ⎝ ⎛ ⎣ ⎡ 1 0 0 ⎦ ⎤ , ⎣ ⎡ 2 1 0 ⎦ ⎤ , ⎣ ⎡ 3 3 1 ⎦ ⎤ , ⎣ ⎡ 4 7 0 ⎦ ⎤ ⎠ ⎞
Basis: { [ 1 0 0 ] , [ 2 1 0 ] , [ 3 3 1 ] } \{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 2 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 3 \\ 3 \\ 1 \end{bmatrix} \} { ⎣ ⎡ 1 0 0 ⎦ ⎤ , ⎣ ⎡ 2 1 0 ⎦ ⎤ , ⎣ ⎡ 3 3 1 ⎦ ⎤ }
Row Space :
span { [ 1 2 3 4 ] , [ 0 1 3 7 ] , [ 0 0 1 0 ] } ∈ R 4 \text{span} \{ \begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 3 \\ 7 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} \} \in \mathbb{R}^{4} span { ⎣ ⎡ 1 2 3 4 ⎦ ⎤ , ⎣ ⎡ 0 1 3 7 ⎦ ⎤ , ⎣ ⎡ 0 0 1 0 ⎦ ⎤ } ∈ R 4
Basis: { [ 1 2 3 4 ] , [ 0 1 3 7 ] , [ 0 0 1 0 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 3 \\ 7 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 1 2 3 4 ⎦ ⎤ , ⎣ ⎡ 0 1 3 7 ⎦ ⎤ , ⎣ ⎡ 0 0 1 0 ⎦ ⎤ }
5.2 Gram-Schmidt Process and QR Factorization 5.2 Gram-Schmidt Process and QR Factorization
Last time: Orthonormal Basis { Northonormal Bases Orthogonal Projection \text{Orthonormal Basis} \begin{cases} \text{Northonormal Bases} \\ \text{Orthogonal Projection} \end{cases} Orthonormal Basis { Northonormal Bases Orthogonal Projection
Today: Given a subspace W W W with basis β \beta β , find an orthonormal basis for W W W .
Example
W = span { [ 4 0 3 0 ] , [ 25 0 − 25 0 ] } ∈ R 4 W = \text{span} \{ \begin{bmatrix} 4 \\ 0 \\ 3 \\ 0 \end{bmatrix} , \begin{bmatrix} 25 \\ 0 \\ -25 \\ 0 \end{bmatrix} \} \in \mathbb{R}^{4} W = span { ⎣ ⎡ 4 0 3 0 ⎦ ⎤ , ⎣ ⎡ 25 0 − 25 0 ⎦ ⎤ } ∈ R 4 . We want a new basis for W W W that is orthonormal.
New basis: { u ⃗ 1 , u ⃗ 2 } \{ \vec{u}_1 , \vec{u}_2 \} { u 1 , u 2 }
u ⃗ 1 = u ⃗ 1 ∣ ∣ v ⃗ 1 ∣ ∣ \vec{u}_1 = \frac{\vec{u}_1}{ \mid \mid \vec{v}_1 \mid \mid } u 1 = ∣∣ v 1 ∣∣ u 1
∣ ∣ v ⃗ 1 ∣ ∣ = 16 + 9 = 5 \mid \mid \vec{v}_1 \mid \mid = \sqrt{16 + 9} = 5 ∣∣ v 1 ∣∣= 16 + 9 = 5
proj L ( v ⃗ 2 ) = ( u ⃗ 1 ) ⋅ ( v ⃗ 2 ) u ⃗ 1 \text{proj}_{L} \left( \vec{v}_2 \right) = \left( \vec{u}_1 \right) \cdot \left( \vec{v}_2 \right) \vec{u}_1 proj L ( v 2 ) = ( u 1 ) ⋅ ( v 2 ) u 1
= 5 [ 4 5 0 3 5 0 ] = [ 4 0 3 0 ] = 5 \begin{bmatrix} \frac{4}{5} \\ 0 \\ \frac{3}{5} \\ 0 \end{bmatrix} = \begin{bmatrix} 4 \\ 0 \\ 3 \\ 0 \end{bmatrix} = 5 ⎣ ⎡ 5 4 0 5 3 0 ⎦ ⎤ = ⎣ ⎡ 4 0 3 0 ⎦ ⎤
∴ u ⃗ 1 = [ 4 5 0 3 5 0 ] \therefore \vec{u}_1 = \begin{bmatrix} \frac{4}{5} \\ 0 \\ \frac{3}{5} \\ 0 \end{bmatrix} ∴ u 1 = ⎣ ⎡ 5 4 0 5 3 0 ⎦ ⎤
u ⃗ 2 = v ⃗ 2 ⊥ ∣ ∣ v ⃗ 2 ⊥ ∣ ∣ \vec{u}_2 = \frac{\vec{v}_2 ^{\bot}}{ \mid \mid \vec{v}_2 ^{\bot} \mid \mid } u 2 = ∣∣ v 2 ⊥ ∣∣ v 2 ⊥
v ⃗ 2 ⊥ = v ⃗ 2 − proj L ( v ⃗ i ) \vec{v} _2 ^{\bot} = \vec{v} _2 - \text{proj} _{L} \left( \vec{v} _i \right) v 2 ⊥ = v 2 − proj L ( v i )
= [ 25 0 − 25 0 ] − [ 4 0 3 0 ] = [ 21 0 − 28 0 ] = \begin{bmatrix} 25 \\ 0 \\ -25 \\ 0 \end{bmatrix} - \begin{bmatrix} 4 \\ 0 \\ 3 \\ 0 \end{bmatrix} = \begin{bmatrix} 21 \\ 0 \\ -28 \\ 0 \end{bmatrix} = ⎣ ⎡ 25 0 − 25 0 ⎦ ⎤ − ⎣ ⎡ 4 0 3 0 ⎦ ⎤ = ⎣ ⎡ 21 0 − 28 0 ⎦ ⎤
∣ ∣ v ⃗ 2 ⊥ ∣ ∣ = 2 1 2 + 2 8 2 = 35 \mid \mid \vec{v}_2 ^{\bot} \mid \mid = \sqrt{21^{2} + 28^{2}} = 35 ∣∣ v 2 ⊥ ∣∣= 2 1 2 + 2 8 2 = 35
∴ u ⃗ 2 = [ 3 5 0 − 4 5 0 ] \therefore \vec{u}_2 = \begin{bmatrix} \frac{3}{5} \\ 0 \\ -\frac{4}{5} \\ 0 \end{bmatrix} ∴ u 2 = ⎣ ⎡ 5 3 0 − 5 4 0 ⎦ ⎤
Example
W = span { [ 4 0 3 0 ] , [ 25 0 − 25 0 ] , [ 0 1 1 1 ] } ∈ R 4 W = \text{span} \{ \begin{bmatrix} 4 \\ 0 \\ 3 \\ 0 \end{bmatrix} , \begin{bmatrix} 25 \\ 0 \\ -25 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 1 \\ 1 \end{bmatrix} \} \in \mathbb{R}^{4} W = span { ⎣ ⎡ 4 0 3 0 ⎦ ⎤ , ⎣ ⎡ 25 0 − 25 0 ⎦ ⎤ , ⎣ ⎡ 0 1 1 1 ⎦ ⎤ } ∈ R 4 .
Orthonormal Basis: { u ⃗ 1 , u ⃗ 2 , u ⃗ 3 } \{ \vec{u}_1 , \vec{u}_2 , \vec{u}_3 \} { u 1 , u 2 , u 3 }
We begin the same way:
u ⃗ 1 = v ⃗ 1 ∣ ∣ v ⃗ 1 ∣ ∣ \vec{u}_1 = \frac{\vec{v}_1}{ \mid \mid \vec{v}_1 \mid \mid } u 1 = ∣∣ v 1 ∣∣ v 1
L = span { u ⃗ 1 } L = \text{span}\{ \vec{u}_1 \} L = span { u 1 }
v ⃗ 2 ⊥ = v ⃗ 2 − proj L ( v ⃗ ) \vec{v}_2 ^{\bot} = \vec{v}_2 - \text{proj}_L \left( \vec{v} \right) v 2 ⊥ = v 2 − proj L ( v )
u ⃗ 2 = v ⃗ 2 ⊥ ∣ ∣ v ⃗ 2 ⊥ ∣ ∣ \vec{u}_2 = \frac{\vec{v}_2 ^{\bot}}{ \mid \mid \vec{v}_2 ^{\bot} \mid \mid } u 2 = ∣∣ v 2 ⊥ ∣∣ v 2 ⊥
u ⃗ 1 = [ 4 5 0 3 5 0 ] \vec{u}_1 = \begin{bmatrix} \frac{4}{5} \\ 0 \\ \frac{3}{5} \\ 0 \end{bmatrix} u 1 = ⎣ ⎡ 5 4 0 5 3 0 ⎦ ⎤
u ⃗ 2 = [ 3 5 0 − 4 5 0 ] \vec{u}_2 = \begin{bmatrix} \frac{3}{5} \\ 0 \\ -\frac{4}{5} \\ 0 \end{bmatrix} u 2 = ⎣ ⎡ 5 3 0 − 5 4 0 ⎦ ⎤
Let V = span { u ⃗ 1 , u ⃗ 2 } = span { v ⃗ 1 , v ⃗ 2 } V = \text{span}\{ \vec{u} _1 , \vec{u} _2 \} = \text{span} \{ \vec{v} _1 , \vec{v} _2 \} V = span { u 1 , u 2 } = span { v 1 , v 2 } . We may write v ⃗ 3 = proj V ( v ⃗ 3 ) + v ⃗ 3 ⊥ \vec{v} _3 = \text{proj} _{V} \left( \vec{v} _3 \right) + \vec{v} _3 ^{\bot} v 3 = proj V ( v 3 ) + v 3 ⊥ . Then u ⃗ 3 = v ⃗ 3 ⊥ ∣ ∣ v ⃗ 3 ⊥ ∣ ∣ \vec{u} _3 = \frac{\vec{v} _3 ^{\bot}}{ \mid \mid \vec{v} _3 ^{\bot} \mid \mid } u 3 = ∣∣ v 3 ⊥ ∣∣ v 3 ⊥
proj V ( v ⃗ 3 ) = ( u ⃗ 1 ⋅ v ⃗ 3 ) u ⃗ 1 + ( u ⃗ 2 ⋅ v ⃗ 3 ) u ⃗ 2 \text{proj}_{V} \left( \vec{v}_3 \right) = \left( \vec{u}_1 \cdot \vec{v}_3 \right) \vec{u}_1 + \left( \vec{u}_2 \cdot \vec{v}_3 \right) \vec{u}_2 proj V ( v 3 ) = ( u 1 ⋅ v 3 ) u 1 + ( u 2 ⋅ v 3 ) u 2 (Projection along subspace)
= 3 5 ⋅ [ 4 5 0 3 5 0 ] + ( − 4 5 ) ⋅ [ 3 5 0 − 4 5 0 ] = [ 0 0 25 25 0 ] = [ 0 0 1 0 ] = \frac{3}{5} \cdot \begin{bmatrix} \frac{4}{5} \\ 0 \\ \frac{3}{5} \\ 0 \end{bmatrix} + \left( -\frac{4}{5} \right) \cdot \begin{bmatrix} \frac{3}{5} \\ 0 \\ -\frac{4}{5} \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ \frac{25}{25} \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} = 5 3 ⋅ ⎣ ⎡ 5 4 0 5 3 0 ⎦ ⎤ + ( − 5 4 ) ⋅ ⎣ ⎡ 5 3 0 − 5 4 0 ⎦ ⎤ = ⎣ ⎡ 0 0 25 25 0 ⎦ ⎤ = ⎣ ⎡ 0 0 1 0 ⎦ ⎤ (Projection of v ⃗ 3 \vec{v}_3 v 3 )
v ⃗ 3 ⊥ = [ 0 1 1 1 ] − [ 0 0 1 0 ] = [ 0 1 0 1 ] \vec{v}_3 ^{\bot} = \begin{bmatrix} 0 \\ 1 \\ 1 \\ 1 \end{bmatrix} - \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 1 \end{bmatrix} v 3 ⊥ = ⎣ ⎡ 0 1 1 1 ⎦ ⎤ − ⎣ ⎡ 0 0 1 0 ⎦ ⎤ = ⎣ ⎡ 0 1 0 1 ⎦ ⎤
∣ ∣ v ⃗ 3 ⊥ ∣ ∣ = 2 \mid \mid \vec{v}_3 ^{\bot} \mid \mid = \sqrt{2} ∣∣ v 3 ⊥ ∣∣= 2
∴ u ⃗ 3 = [ 0 1 2 0 1 2 ] \therefore \vec{u}_3 = \begin{bmatrix} 0 \\ \frac{1}{\sqrt{2} } \\ 0 \\ \frac{1}{\sqrt{2} } \end{bmatrix} ∴ u 3 = ⎣ ⎡ 0 2 1 0 2 1 ⎦ ⎤
Gram-Schmidt Process : Let β = { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ m } \beta = \{ \vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_m \} β = { v 1 , v 2 , ⋯ , v m } be a basis for a subspace W W W of R n \mathbb{R}^{n} R n .
We construct an orthonormal basis U = { u ⃗ 1 , u ⃗ 2 , ⋯ , u ⃗ m } \mathcal{U} = \{ \vec{u}_1 , \vec{u}_2 , \cdots , \vec{u}_m \} U = { u 1 , u 2 , ⋯ , u m } for W W W as follows:
u ⃗ 1 = v ⃗ 1 ∣ ∣ v ⃗ 1 ∣ ∣ \vec{u}_1 = \frac{\vec{v}_1}{ \mid \mid \vec{v}_1 \mid \mid } u 1 = ∣∣ v 1 ∣∣ v 1
u ⃗ 2 = v ⃗ 2 ⊥ ∣ ∣ v ⃗ 2 ⊥ ∣ ∣ \vec{u} _2 = \frac{\vec{v} _2 ^{\bot}}{ \mid \mid \vec{v} _2 ^{\bot} \mid \mid } u 2 = ∣∣ v 2 ⊥ ∣∣ v 2 ⊥ where v ⃗ 2 ⊥ = v ⃗ 2 − proj L ( v ⃗ 2 ) \vec{v} _2 ^{\bot} = \vec{v} _2 - \text{proj} _{L} \left( \vec{v} _2 \right) v 2 ⊥ = v 2 − proj L ( v 2 ) and L = span { v ⃗ 1 } = span { u ⃗ 1 } L = \text{span} \{ \vec{v} _1 \} = \text{span} \{ \vec{u} _1 \} L = span { v 1 } = span { u 1 }
To get u ⃗ j \vec{u} _j u j , project v ⃗ j \vec{v} _j v j onto span { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ j − 1 = span { u ⃗ 1 , u ⃗ 2 , ⋯ , u ⃗ j − 1 } \text{span} \{ \vec{v} _1 , \vec{v} _2 , \cdots , \vec{v} _{j-1} = \text{span} \{ \vec{u} _1 , \vec{u} _2 , \cdots , \vec{u} _{j-1} \} span { v 1 , v 2 , ⋯ , v j − 1 = span { u 1 , u 2 , ⋯ , u j − 1 }
v ⃗ j ⊥ = v ⃗ j − proj V ( v ⃗ j ) \vec{v}_j ^{\bot} = \vec{v}_j - \text{proj}_V \left( \vec{v}_j \right) v j ⊥ = v j − proj V ( v j ) gives the direction
u ⃗ j = v ⃗ j ⊥ ∣ ∣ v ⃗ j ⊥ ∣ ∣ \vec{u}_j = \frac{\vec{v}_j ^{\bot}}{ \mid \mid \vec{v}_j ^{\bot} \mid \mid } u j = ∣∣ v j ⊥ ∣∣ v j ⊥
Note: v ⃗ j ⊥ = v ⃗ j − ( u ⃗ 1 ⋅ v ⃗ j ) u ⃗ 1 − ( u ⃗ 2 ⋅ v ⃗ j ) u ⃗ 2 − ⋯ − ( u ⃗ j − 1 ⋅ v ⃗ j ) u ⃗ j − 1 \vec{v} _j ^{\bot} = \vec{v} _j - \left( \vec{u} _1 \cdot \vec{v} _j \right) \vec{u} _1 - \left( \vec{u} _2 \cdot \vec{v} _j \right) \vec{u} _2 - \cdots - \left( \vec{u} _{j-1} \cdot \vec{v} _j \right) \vec{u} _{j-1} v j ⊥ = v j − ( u 1 ⋅ v j ) u 1 − ( u 2 ⋅ v j ) u 2 − ⋯ − ( u j − 1 ⋅ v j ) u j − 1
Exercise : Perform the Gram-Schmidt process on { [ 1 1 1 1 ] , [ 2 2 3 3 ] } \{ \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} , \begin{bmatrix} 2 \\ 2 \\ 3 \\ 3 \end{bmatrix} \} { ⎣ ⎡ 1 1 1 1 ⎦ ⎤ , ⎣ ⎡ 2 2 3 3 ⎦ ⎤ }
∣ ∣ v ⃗ 1 ∣ ∣ = 1 + 1 + 1 + 1 = 2 \mid \mid \vec{v}_1 \mid \mid = \sqrt{1 + 1 + 1 + 1} = 2 ∣∣ v 1 ∣∣= 1 + 1 + 1 + 1 = 2
v ⃗ 2 ⊥ = v ⃗ 2 − ( v ⃗ 2 ⋅ u ⃗ 1 ) u ⃗ 1 \vec{v}_2 ^{\bot} = \vec{v}_2 - \left( \vec{v}_2 \cdot \vec{u}_1 \right) \vec{u}_1 v 2 ⊥ = v 2 − ( v 2 ⋅ u 1 ) u 1
= [ 2 2 3 4 ] − ( 1 + 1 + 3 2 + 3 2 ) [ 1 2 1 2 1 2 1 2 ] = [ − 1 2 − 1 2 1 2 1 2 ] = \begin{bmatrix} 2 \\ 2 \\ 3 \\ 4 \end{bmatrix} - \left( 1 + 1 + \frac{3}{2} + \frac{3}{2} \right) \begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} = \begin{bmatrix} -\frac{1}{2} \\ -\frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} = ⎣ ⎡ 2 2 3 4 ⎦ ⎤ − ( 1 + 1 + 2 3 + 2 3 ) ⎣ ⎡ 2 1 2 1 2 1 2 1 ⎦ ⎤ = ⎣ ⎡ − 2 1 − 2 1 2 1 2 1 ⎦ ⎤
∣ ∣ v ⃗ 2 ⊥ ∣ ∣ = 1 4 + 1 4 + 1 4 + 1 4 = 1 \mid \mid \vec{v}_2 ^{\bot} \mid \mid = \sqrt{\frac{1}{4} + \frac{1}{4} + \frac{1}{4} + \frac{1}{4}} = 1 ∣∣ v 2 ⊥ ∣∣= 4 1 + 4 1 + 4 1 + 4 1 = 1
u ⃗ 1 = [ 1 2 1 2 1 2 1 2 ] \vec{u}_1 = \begin{bmatrix} \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} u 1 = ⎣ ⎡ 2 1 2 1 2 1 2 1 ⎦ ⎤
u ⃗ 2 = [ − 1 2 − 1 2 1 2 1 2 ] \vec{u}_2 = \begin{bmatrix} -\frac{1}{2} \\ -\frac{1}{2} \\ \frac{1}{2} \\ \frac{1}{2} \end{bmatrix} u 2 = ⎣ ⎡ − 2 1 − 2 1 2 1 2 1 ⎦ ⎤
Let’s interpret this process via matrices
A = [ 1 2 1 2 1 3 1 3 ] A = \begin{bmatrix} 1 & 2 \\ 1 & 2 \\ 1 & 3 \\ 1 & 3 \end{bmatrix} A = ⎣ ⎡ 1 1 1 1 2 2 3 3 ⎦ ⎤ has linearly independent columns. We want to write A = Q R A = QR A = QR where Q Q Q has orthonormal columns.
Suppose [ ∣ ∣ v ⃗ 1 v ⃗ 2 ∣ ∣ ] = [ ∣ ∣ u ⃗ 1 u ⃗ 1 ∣ ∣ ] R \begin{bmatrix} | & | \\ \vec{v}_1 & \vec{v}_2 \\ | & | \end{bmatrix} = \begin{bmatrix} | & | \\ \vec{u}_1 & \vec{u}_1 \\ | & | \end{bmatrix} R ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⎦ ⎤ = ⎣ ⎡ ∣ u 1 ∣ ∣ u 1 ∣ ⎦ ⎤ R (A = Q R A = QR A = QR )
R = [ ∣ ∣ v ⃗ 1 ∣ ∣ u ⃗ 1 ⋅ v ⃗ 2 0 ∣ ∣ v ⃗ 2 ⊥ ∣ ∣ ] R = \begin{bmatrix} \mid \mid \vec{v}_1 \mid \mid & \vec{u}_1 \cdot \vec{v}_2 \\ 0 & \mid \mid \vec{v}_2 ^{\bot} \mid \mid \end{bmatrix} R = [ ∣∣ v 1 ∣∣ 0 u 1 ⋅ v 2 ∣∣ v 2 ⊥ ∣∣ ]
Check that this R R R works:
First column of [ ∣ ∣ u ⃗ 1 u ⃗ 2 ∣ ∣ ] R \begin{bmatrix} | & | \\ \vec{u}_1 & \vec{u}_2 \\ | & | \end{bmatrix} R ⎣ ⎡ ∣ u 1 ∣ ∣ u 2 ∣ ⎦ ⎤ R is [ ∣ ∣ u ⃗ 1 u ⃗ 2 ∣ ∣ ] [ ∣ ∣ v ⃗ 1 ∣ ∣ 0 ] \begin{bmatrix} | & | \\ \vec{u}_1 & \vec{u}_2 \\ | & | \end{bmatrix} \begin{bmatrix} \mid \mid \vec{v}_1 \mid \mid \\ 0 \end{bmatrix} ⎣ ⎡ ∣ u 1 ∣ ∣ u 2 ∣ ⎦ ⎤ [ ∣∣ v 1 ∣∣ 0 ]
∣ ∣ v ⃗ 1 ∣ ∣ u ⃗ 1 = v ⃗ 1 \mid \mid \vec{v}_1 \mid \mid \vec{u}_1 = \vec{v}_1 ∣∣ v 1 ∣∣ u 1 = v 1
Second column of [ ∣ ∣ u ⃗ 1 u ⃗ 2 ∣ ∣ ] R \begin{bmatrix} | & | \\ \vec{u}_1 & \vec{u}_2 \\ | & | \end{bmatrix} R ⎣ ⎡ ∣ u 1 ∣ ∣ u 2 ∣ ⎦ ⎤ R is [ ∣ ∣ u ⃗ 1 u ⃗ 2 ∣ ∣ ] [ u ⃗ 1 ⋅ v ⃗ 2 ∣ ∣ v ⃗ 2 ⊥ ∣ ∣ ] \begin{bmatrix} | & | \\ \vec{u}_1 & \vec{u}_2 \\ | & | \end{bmatrix} \begin{bmatrix} \vec{u}_1 \cdot \vec{v}_2 \\ \mid \mid \vec{v}_2 ^{\bot} \mid \mid \end{bmatrix} ⎣ ⎡ ∣ u 1 ∣ ∣ u 2 ∣ ⎦ ⎤ [ u 1 ⋅ v 2 ∣∣ v 2 ⊥ ∣∣ ]
= ( u ⃗ 1 ⋅ v ⃗ 2 ) u ⃗ 1 + ∣ ∣ v ⃗ 2 ⊥ ∣ ∣ u ⃗ 2 = ( u ⃗ 1 ⋅ v ⃗ 2 ) u ⃗ 1 + v ⃗ 2 ⊥ = \left( \vec{u}_1 \cdot \vec{v}_2 \right) \vec{u}_1 + \mid \mid \vec{v}_2 ^{\bot} \mid \mid \vec{u}_2 = \left( \vec{u}_1 \cdot \vec{v}_2 \right) \vec{u}_1 + \vec{v}_2 ^{\bot} = ( u 1 ⋅ v 2 ) u 1 + ∣∣ v 2 ⊥ ∣∣ u 2 = ( u 1 ⋅ v 2 ) u 1 + v 2 ⊥
= proj L ( v ⃗ 2 ) + v ⃗ 2 ⊥ = v ⃗ 2 = \text{proj}_{L} \left( \vec{v}_2 \right) + \vec{v}_2 ^{\bot} = \vec{v}_2 = proj L ( v 2 ) + v 2 ⊥ = v 2
Example
[ 1 2 1 2 1 3 1 3 ] = [ 1 2 − 1 2 1 2 − 1 2 1 2 1 2 1 2 1 2 ] R \begin{bmatrix} 1 & 2 \\ 1 & 2 \\ 1 & 3 \\ 1 & 3 \end{bmatrix} = \begin{bmatrix} \frac{1}{2} & -\frac{1}{2} \\ \frac{1}{2} & -\frac{1}{2} \\ \frac{1}{2} & \frac{1}{2} \\ \frac{1}{2} & \frac{1}{2} \end{bmatrix} R ⎣ ⎡ 1 1 1 1 2 2 3 3 ⎦ ⎤ = ⎣ ⎡ 2 1 2 1 2 1 2 1 − 2 1 − 2 1 2 1 2 1 ⎦ ⎤ R
R = [ ∣ ∣ v ⃗ 1 ∣ ∣ u ⃗ 1 ⋅ v ⃗ 2 0 ∣ ∣ v ⃗ 2 ⊥ ∣ ∣ ] = [ 2 5 0 1 ] R =
\begin{bmatrix}
\mid \mid \vec{v}_1 \mid \mid & \vec{u}_1 \cdot \vec{v}_2 \\
0 & \mid \mid \vec{v}_2 ^{\bot} \mid \mid
\end{bmatrix}
=
\begin{bmatrix}
2 & 5 \\
0 & 1
\end{bmatrix} R = [ ∣∣ v 1 ∣∣ 0 u 1 ⋅ v 2 ∣∣ v 2 ⊥ ∣∣ ] = [ 2 0 5 1 ]
QR-Factorization
Consider an n × m n\times m n × m matrix A A A with linearly independent columns v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ m \vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_m v 1 , v 2 , ⋯ , v m .
There exists an n × m n\times m n × m matrix Q Q Q with orthonormal columns u ⃗ 1 , u ⃗ 2 , ⋯ , u ⃗ m \vec{u}_1 , \vec{u}_2 , \cdots , \vec{u}_m u 1 , u 2 , ⋯ , u m (comes from Gram-Schmidt) and
An upper triangular m × m m \times m m × m matrix R R R with positive diagonal entries such that A = Q R A = QR A = QR
Moreover, for the matrix R = [ R i j ] R = [R_{ij}] R = [ R ij ] , we have:
r 11 = ∣ ∣ v ⃗ 1 ∣ ∣ r_{11} = \mid \mid \vec{v}_1 \mid \mid r 11 =∣∣ v 1 ∣∣
r j j = ∣ ∣ v ⃗ j ⊥ ∣ ∣ r_{jj} = \mid \mid \vec{v}_{j} ^{\bot} \mid \mid r jj =∣∣ v j ⊥ ∣∣
r i j = u ⃗ i ⋅ v ⃗ j r_{ij} = \vec{u}_i \cdot \vec{v}_j r ij = u i ⋅ v j for i < j i < j i < j
Example
Find the Q R QR QR -Factorization of A = [ 1 0 1 7 7 1 1 2 − 1 7 7 − 1 ] A = \begin{bmatrix} 1 & 0 & 1 \\ 7 & 7 & 1 \\ 1 & 2 & -1 \\ 7 & 7 & -1 \end{bmatrix} A = ⎣ ⎡ 1 7 1 7 0 7 2 7 1 1 − 1 − 1 ⎦ ⎤ .
R = [ ∣ ∣ v ⃗ 1 ∣ ∣ u ⃗ 1 ⋅ v ⃗ 2 u ⃗ 1 ⋅ v ⃗ 3 0 ∣ ∣ v ⃗ 2 ⊥ ∣ ∣ u ⃗ 2 ⋅ v ⃗ 3 0 0 ∣ ∣ v ⃗ 3 ⊥ ∣ ∣ ] R = \begin{bmatrix} \mid \mid \vec{v}_1 \mid \mid & \vec{u}_1 \cdot \vec{v}_2 & \vec{u}_1 \cdot \vec{v}_3 \\ 0 & \mid \mid \vec{v}_2 ^{\bot} \mid \mid & \vec{u}_2 \cdot \vec{v}_3 \\ 0 & 0 & \mid \mid \vec{v}_3 ^{\bot } \mid \mid \end{bmatrix} R = ⎣ ⎡ ∣∣ v 1 ∣∣ 0 0 u 1 ⋅ v 2 ∣∣ v 2 ⊥ ∣∣ 0 u 1 ⋅ v 3 u 2 ⋅ v 3 ∣∣ v 3 ⊥ ∣∣ ⎦ ⎤
Solution :
R = [ 10 10 0 0 2 − 2 0 0 2 ] R = \begin{bmatrix} 10 & 10 & 0 \\ 0 & \sqrt{2} & -\sqrt{2} \\ 0 & 0 & \sqrt{2} \end{bmatrix} R = ⎣ ⎡ 10 0 0 10 2 0 0 − 2 2 ⎦ ⎤
∣ ∣ v ⃗ 1 ∣ ∣ = 1 + 49 + 1 + 49 = 10 \mid \mid \vec{v}_1 \mid \mid = \sqrt{1 + 49 + 1 + 49} = 10 ∣∣ v 1 ∣∣= 1 + 49 + 1 + 49 = 10
u ⃗ 1 = [ 1 10 7 10 1 10 7 10 ] \vec{u}_1 = \begin{bmatrix} \frac{1}{10} \\ \frac{7}{10} \\ \frac{1}{10} \\ \frac{7}{10} \end{bmatrix} u 1 = ⎣ ⎡ 10 1 10 7 10 1 10 7 ⎦ ⎤
v ⃗ 2 ⊥ = v ⃗ 2 − ( u ⃗ 1 ⋅ v ⃗ 2 ) u ⃗ 1 \vec{v}_2 ^{\bot} = \vec{v}_2 - \left( \vec{u}_1 \cdot \vec{v}_2 \right) \vec{u}_1 v 2 ⊥ = v 2 − ( u 1 ⋅ v 2 ) u 1
v ⃗ 2 ⊥ = [ 0 7 2 7 ] − ( 100 10 ) [ 1 10 7 10 1 10 7 10 ] = [ − 1 0 1 0 ] \vec{v}_2 ^{\bot} = \begin{bmatrix} 0 \\ 7 \\ 2 \\ 7 \end{bmatrix} - \left( \frac{100}{10} \right) \begin{bmatrix} \frac{1}{10} \\ \frac{7}{10} \\ \frac{1}{10}\\ \frac{7}{10} \end{bmatrix} = \begin{bmatrix} -1 \\ 0 \\ 1 \\ 0 \end{bmatrix} v 2 ⊥ = ⎣ ⎡ 0 7 2 7 ⎦ ⎤ − ( 10 100 ) ⎣ ⎡ 10 1 10 7 10 1 10 7 ⎦ ⎤ = ⎣ ⎡ − 1 0 1 0 ⎦ ⎤
∣ ∣ v ⃗ 2 ⊥ ∣ ∣ = 2 \mid \mid \vec{v}_2 ^{\bot} \mid \mid = \sqrt{2} ∣∣ v 2 ⊥ ∣∣= 2
u ⃗ 2 = [ − 1 2 0 1 2 0 ] \vec{u}_2 = \begin{bmatrix} -\frac{1}{\sqrt{2} } \\ 0 \\ \frac{1}{\sqrt{2} } \\ 0 \end{bmatrix} u 2 = ⎣ ⎡ − 2 1 0 2 1 0 ⎦ ⎤
v ⃗ 3 ⊥ = v ⃗ 3 − ( u ⃗ 1 ⋅ v ⃗ 3 ) u ⃗ 1 − ( u ⃗ 2 ⋅ v ⃗ 3 ) u ⃗ 2 \vec{v}_3 ^{\bot} = \vec{v}_3 - \left( \vec{u}_1 \cdot \vec{v}_3 \right) \vec{u}_1 - \left( \vec{u}_2 \cdot \vec{v}_3 \right) \vec{u}_2 v 3 ⊥ = v 3 − ( u 1 ⋅ v 3 ) u 1 − ( u 2 ⋅ v 3 ) u 2
v ⃗ 3 ⊥ = [ 1 1 − 1 − 1 ] − ( 8 − 8 10 ) [ 1 10 7 10 1 10 7 10 ] − ( − 2 ) [ − 1 2 0 1 2 0 ] \vec{v}_3 ^{\bot} = \begin{bmatrix} 1 \\ 1 \\ - 1\\ -1 \end{bmatrix} - \left( \frac{8-8}{10} \right) \begin{bmatrix} \frac{1}{10} \\ \frac{7}{10} \\ \frac{1}{10} \\ \frac{7}{10} \end{bmatrix} - \left( -\sqrt{2} \right) \begin{bmatrix} -\frac{1}{\sqrt{2} }\\ 0 \\ \frac{1}{\sqrt{2} } \\ 0 \end{bmatrix} v 3 ⊥ = ⎣ ⎡ 1 1 − 1 − 1 ⎦ ⎤ − ( 10 8 − 8 ) ⎣ ⎡ 10 1 10 7 10 1 10 7 ⎦ ⎤ − ( − 2 ) ⎣ ⎡ − 2 1 0 2 1 0 ⎦ ⎤
v ⃗ 3 ⊥ = [ 1 1 − 1 − 1 ] + [ − 1 0 1 0 ] = [ 0 1 0 − 1 ] \vec{v}_3 ^{\bot} = \begin{bmatrix} 1 \\ 1 \\ -1 \\ -1 \end{bmatrix} + \begin{bmatrix} -1 \\ 0 \\ 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \\ 0 \\ -1 \end{bmatrix} v 3 ⊥ = ⎣ ⎡ 1 1 − 1 − 1 ⎦ ⎤ + ⎣ ⎡ − 1 0 1 0 ⎦ ⎤ = ⎣ ⎡ 0 1 0 − 1 ⎦ ⎤
u ⃗ 3 = v ⃗ 3 ⊥ ∣ ∣ v ⃗ 3 ⊥ ∣ ∣ = [ 0 1 2 0 − 1 2 ] \vec{u}_3 = \frac{\vec{v}_3 ^{\bot}}{ \mid \mid \vec{v}_3 ^{\bot} \mid \mid } = \begin{bmatrix} 0 \\ \frac{1}{\sqrt{2} } \\ 0 \\ -\frac{1}{\sqrt{2} } \end{bmatrix} u 3 = ∣∣ v 3 ⊥ ∣∣ v 3 ⊥ = ⎣ ⎡ 0 2 1 0 − 2 1 ⎦ ⎤
∴ Q = [ 1 10 − 1 2 0 7 10 0 1 2 1 10 1 2 0 7 10 0 − 1 2 ] \therefore Q = \begin{bmatrix} \frac{1}{10} & -\frac{1}{\sqrt{2} } & 0 \\ \frac{7}{10} & 0 & \frac{1}{\sqrt{2} } \\ \frac{1}{10} & \frac{1}{\sqrt{2} } & 0 \\ \frac{7}{10} & 0 & -\frac{1}{\sqrt{2} } \end{bmatrix} ∴ Q = ⎣ ⎡ 10 1 10 7 10 1 10 7 − 2 1 0 2 1 0 0 2 1 0 − 2 1 ⎦ ⎤
How else can we find R R R ?
Case 1: A A A , Q Q Q are n × n n \times n n × n square.
A A A and Q Q Q have linearly independent columns which means that Q Q Q is invertible.
Q − 1 A = Q − 1 Q R ⟹ R = Q − 1 A Q^{-1}A = Q^{-1}QR \implies R = Q^{-1} A Q − 1 A = Q − 1 QR ⟹ R = Q − 1 A
Case 2: Often A A A , Q Q Q are n × m n\times m n × m with n ≠ m n \neq m n = m (n > m)
Definition:
The transpose of Q Q Q , denoted Q T Q^{T} Q T , has (i, j)-entry the (j, i)-entry of Q Q Q .
When Q = [ ∣ ∣ ∣ u ⃗ 1 u ⃗ 2 ⋯ u ⃗ m ∣ ∣ ∣ ] Q = \begin{bmatrix} | & | & & | \\ \vec{u}_1 & \vec{u}_2 & \cdots & \vec{u}_m \\ | & | & & | \end{bmatrix} Q = ⎣ ⎡ ∣ u 1 ∣ ∣ u 2 ∣ ⋯ ∣ u m ∣ ⎦ ⎤ with { u ⃗ i } \{ \vec{u}_i \} { u i } orthonormal, Q T = [ – u ⃗ 1 T – – u ⃗ 2 T – ⋮ – u ⃗ m – ] Q^{T} = \begin{bmatrix} – & \vec{u}_1 ^{T} & – \\ – & \vec{u}_2 ^{T} & – \\ & \vdots & \\ – & \vec{u}_m & – \end{bmatrix} Q T = ⎣ ⎡ – – – u 1 T u 2 T ⋮ u m – – – ⎦ ⎤ .
Q T Q = [ − − u ⃗ 1 T − − − − u ⃗ 2 T − − ⋮ − − u ⃗ m − − ] [ ∣ ∣ u ⃗ 1 ⋯ u ⃗ m ∣ ∣ ] = I m Q^T Q =
\begin{bmatrix} -- & \vec{u}_1 ^{T} & -- \\\ -- & \vec{u}_2 ^{T} & -- \\\ & \vdots & \\\ -- & \vec{u}_m & -- \end{bmatrix}
\begin{bmatrix}
| & & | \\
\vec{u}_1 & \cdots & \vec{u}_m \\
| & & |
\end{bmatrix}
=
I_m Q T Q = ⎣ ⎡ − − − − − − u 1 T u 2 T ⋮ u m − − − − − − ⎦ ⎤ ⎣ ⎡ ∣ u 1 ∣ ⋯ ∣ u m ∣ ⎦ ⎤ = I m
Has (i, j)-entry
u ⃗ j ⋅ u ⃗ j = { 1 if i = j 0 if i ≠ j \vec{u}_j \cdot \vec{u}_j = \begin{cases} 1 & \text{if } i=j \\ 0 & \text{if } i\neq j \end{cases} u j ⋅ u j = { 1 0 if i = j if i = j
Way #2 of finding matrix R R R :
We have Q T Q = I m Q^{T}Q = I_m Q T Q = I m .
A = Q R ⟹ Q T A = Q T Q R ⟹ R = Q T A A = QR \implies Q^{T}A = Q^{T}QR \implies R = Q^{T}A A = QR ⟹ Q T A = Q T QR ⟹ R = Q T A
Example
A = [ 1 0 1 7 7 1 1 2 − 1 7 7 − 1 ] A = \begin{bmatrix} 1 & 0 & 1 \\ 7 & 7 & 1 \\ 1 & 2 & -1 \\ 7 & 7 & -1 \end{bmatrix} A = ⎣ ⎡ 1 7 1 7 0 7 2 7 1 1 − 1 − 1 ⎦ ⎤ and Q = [ 1 10 − 1 2 0 7 10 0 1 2 1 10 1 2 0 7 10 0 − 1 2 ] Q = \begin{bmatrix} \frac{1}{10} & -\frac{1}{\sqrt{2} } & 0 \\ \frac{7}{10} & 0 & \frac{1}{\sqrt{2} } \\ \frac{1}{10} & \frac{1}{\sqrt{2} } & 0 \\ \frac{7}{10} & 0 & -\frac{1}{\sqrt{2} } \end{bmatrix} Q = ⎣ ⎡ 10 1 10 7 10 1 10 7 − 2 1 0 2 1 0 0 2 1 0 − 2 1 ⎦ ⎤
Q T A = [ 1 10 7 10 1 10 7 10 − 1 2 0 1 2 0 0 1 2 0 − 1 2 ] [ 1 0 1 7 7 1 1 2 − 1 7 7 − 1 ] = [ 10 10 0 0 2 − 2 0 0 2 ] Q^{T}A = \begin{bmatrix} \frac{1}{10} & \frac{7}{10} & \frac{1}{10} & \frac{7}{10} \\ -\frac{1}{\sqrt{2} } & 0 & \frac{1}{\sqrt{2} } & 0 \\ 0 & \frac{1}{\sqrt{2} } & 0 & -\frac{1}{\sqrt{2} } \end{bmatrix} \begin{bmatrix} 1 & 0 & 1 \\ 7 & 7 & 1 \\ 1 & 2 & - 1\\ 7 & 7 & -1 \end{bmatrix} = \begin{bmatrix} 10 & 10 & 0 \\ 0 & \sqrt{2} & -\sqrt{2} \\ 0 & 0 & \sqrt{2} \end{bmatrix} Q T A = ⎣ ⎡ 10 1 − 2 1 0 10 7 0 2 1 10 1 2 1 0 10 7 0 − 2 1 ⎦ ⎤ ⎣ ⎡ 1 7 1 7 0 7 2 7 1 1 − 1 − 1 ⎦ ⎤ = ⎣ ⎡ 10 0 0 10 2 0 0 − 2 2 ⎦ ⎤
5.3 Orthogonal Transformations and Orthogonal Matrices
Orthogonal Transformations:
T : R n → R n T : \mathbb{R}^{n} \to \mathbb{R}^{n} T : R n → R n
Definition : ∣ ∣ T ( x ⃗ ) ∣ ∣ = ∣ ∣ x ⃗ ∣ ∣ \mid \mid T \left( \vec{x} \right) \mid \mid = \mid \mid \vec{x} \mid \mid ∣∣ T ( x ) ∣∣=∣∣ x ∣∣ for all x ⃗ ∈ R n \vec{x} \in \mathbb{R}^{n} x ∈ R n . i.e. T T T preserves lengths.
ker ( T ) = { 0 ⃗ } \text{ker}\left( T \right) = \{ \vec{0} \} ker ( T ) = { 0 } (Any vector mapping to 0 ⃗ \vec{0} 0 must have 0 length)
T T T is invertible
T − 1 T^{-1} T − 1 is an orthogonal transformation
If T 1 T_1 T 1 , T 2 : R n → R n T_2 : \mathbb{R}^{n} \to \mathbb{R}^{n} T 2 : R n → R n are orthogonal transformations, T 1 ⋅ T 2 T_1 \cdot T_2 T 1 ⋅ T 2 orthogonal transformation
Orthogonal Matrices:
n × n n\times n n × n matrix A A A
Definition : The transformation T ( x ⃗ ) = A x ⃗ T \left( \vec{x} \right) = A \vec{x} T ( x ) = A x is an orthogonal transformation.
Characterization : Columns of A A A form an orthonormal basis for R n \mathbb{R}^{n} R n .
A − 1 A^{-1} A − 1 is an orthogonal matrix.
If A 1 A_1 A 1 and A 2 A_2 A 2 are orthogonal matrices, A 1 A 2 A_1A_2 A 1 A 2 is an orthogonal matrix
Example
A = [ 2 2 − 2 2 2 2 2 2 ] A = \begin{bmatrix} \frac{\sqrt{2} }{2} & \frac{-\sqrt{2} }{2} \\ \frac{\sqrt{2} }{2} & \frac{\sqrt{2} }{2} \end{bmatrix} A = [ 2 2 2 2 2 − 2 2 2 ]
The transformation T : R 2 → R 2 T : \mathbb{R}^{2} \to \mathbb{R}^{2} T : R 2 → R 2 given by T ( x ⃗ ) = A x ⃗ T\left( \vec{x} \right) = A\vec{x} T ( x ) = A x is rotation counter-clockwise by θ = π 4 \theta = \frac{\pi}{4} θ = 4 π .
Example
A = [ 0 1 1 0 ] A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} A = [ 0 1 1 0 ]
The transformation T : R 2 → R 2 T : \mathbb{R}^{2}\to \mathbb{R}^{2} T : R 2 → R 2 given by T ( x ⃗ ) = A x ⃗ T\left( \vec{x} \right) = A \vec{x} T ( x ) = A x is a reflection about the line y = x y=x y = x
Non-Example : A = [ 1 0 0 0 ] A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} A = [ 1 0 0 0 ] . The transformation T : R 2 → R 2 T : \mathbb{R}^{2} \to \mathbb{R}^{2} T : R 2 → R 2 given by T ( x ⃗ ) = A x ⃗ T \left( \vec{x} \right) = A \vec{x} T ( x ) = A x is orthogonal projection onto x x x -axis.
This is because it does not preserve length.
Orthogonal projection is not an orthogonal transformation
Remark : For any subspace V V V of R n \mathbb{R}^{n} R n and x ⃗ ∈ R n \vec{x} \in \mathbb{R}^{n} x ∈ R n ,
∣ ∣ proj v ( x ⃗ ) ∣ ∣ ≤ ∣ ∣ x ⃗ ∣ ∣ with equality if and only if x ⃗ ∈ V \mid \mid \text{proj}_v (\vec{x}) \mid \mid \le \mid \mid \vec{x} \mid \mid \text{ with equality if and only if } \vec{x} \in V ∣∣ proj v ( x ) ∣∣≤∣∣ x ∣∣ with equality if and only if x ∈ V
x ⃗ = proj V ( x ⃗ ) + x ⃗ ⊥ \vec{x} = \text{proj}_V \left( \vec{x} \right) + \vec{x}^{\bot} x = proj V ( x ) + x ⊥ where x ⃗ ⊥ \vec{x}^{\bot} x ⊥ is orthogonal to proj V ( x ⃗ ) \text{proj}_V \left( \vec{x} \right) proj V ( x )
∣ ∣ x ⃗ ∣ ∣ 2 = ∣ ∣ proj V ( x ⃗ ) ∣ ∣ 2 + ∣ ∣ x ⃗ ⊥ ∣ ∣ 2 ≥ ∣ ∣ proj V ( x ⃗ ) ∣ ∣ 2 \mid \mid \vec{x} \mid \mid ^{2} = \mid \mid \text{proj}_V \left( \vec{x} \right) \mid \mid ^{2} + \mid \mid \vec{x}^{\bot} \mid \mid ^{2} \ge \mid \mid \text{proj}_V \left( \vec{x} \right) \mid \mid ^{2} ∣∣ x ∣ ∣ 2 =∣∣ proj V ( x ) ∣ ∣ 2 + ∣∣ x ⊥ ∣ ∣ 2 ≥∣∣ proj V ( x ) ∣ ∣ 2
Let’s justify. The columns of an n × n n\times n n × n orthogonal matrix form an orthonormal basis for R n \mathbb{R}^{n} R n .
Theorem : If T : R n → R n T : \mathbb{R}^{n} \to \mathbb{R}^{n} T : R n → R n is an orthogonal transformation and v ⃗ \vec{v} v and w ⃗ \vec{w} w are orthonormal, then T ( v ⃗ ) T \left( \vec{v} \right) T ( v ) and T ( w ⃗ ) T \left( \vec{w} \right) T ( w ) are orthonormal.
Proof :
1) Show T ( v ⃗ ) T \left( \vec{v} \right) T ( v ) and T ( w ⃗ ) T \left( \vec{w} \right) T ( w ) are orthogonal.
Assume ∣ ∣ v ⃗ + w ⃗ ∣ ∣ 2 = ∣ ∣ v ⃗ ∣ ∣ 2 + ∣ ∣ w ⃗ ∣ ∣ 2 \mid \mid \vec{v} + \vec{w} \mid \mid ^{2} = \mid \mid \vec{v} \mid \mid ^{2} + \mid \mid \vec{w} \mid \mid ^{2} ∣∣ v + w ∣ ∣ 2 =∣∣ v ∣ ∣ 2 + ∣∣ w ∣ ∣ 2 . Show ∣ ∣ T ( v ⃗ ) + T ( w ⃗ ) ∣ ∣ 2 = ∣ ∣ T ( v ⃗ ) ∣ ∣ 2 + ∣ ∣ T ( w ⃗ ) ∣ ∣ 2 \mid \mid T \left( \vec{v} \right) + T \left( \vec{w} \right) \mid \mid ^{2} = \mid \mid T \left( \vec{v} \right) \mid \mid ^{2} + \mid \mid T \left( \vec{w} \right) \mid \mid ^{2} ∣∣ T ( v ) + T ( w ) ∣ ∣ 2 =∣∣ T ( v ) ∣ ∣ 2 + ∣∣ T ( w ) ∣ ∣ 2 . We have ∣ ∣ T ( v ⃗ + T ( w ⃗ ) ) ∣ ∣ 2 \mid \mid T \left( \vec{v} + T \left( \vec{w} \right) \right) \mid \mid ^{2} ∣∣ T ( v + T ( w ) ) ∣ ∣ 2 (T is linear)
= ∣ ∣ v ⃗ + w ⃗ ∣ ∣ 2 = \mid \mid \vec{v} + \vec{w} \mid \mid ^{2} =∣∣ v + w ∣ ∣ 2 (T preserves length)
= ∣ ∣ v ⃗ ∣ ∣ 2 + ∣ ∣ w ⃗ ∣ ∣ 2 = \mid \mid \vec{v} \mid \mid ^{2} + \mid \mid \vec{w} \mid \mid ^{2} =∣∣ v ∣ ∣ 2 + ∣∣ w ∣ ∣ 2 (v ⃗ 1 \vec{v}_1 v 1 and w ⃗ \vec{w} w are orthogonal)
= ∣ ∣ T ( v ⃗ ) ∣ ∣ 2 + ∣ ∣ T ( w ⃗ ) ∣ ∣ 2 = \mid \mid T \left( \vec{v} \right) \mid \mid ^{2} + \mid \mid T \left( \vec{w} \right) \mid \mid ^{2} =∣∣ T ( v ) ∣ ∣ 2 + ∣∣ T ( w ) ∣ ∣ 2 . (T preserves lengths)
2) Show T ( v ⃗ ) T \left( \vec{v} \right) T ( v ) and T ( w ⃗ ) T \left( \vec{w} \right) T ( w ) are unit.
v ⃗ \vec{v} v and w ⃗ \vec{w} w are unit. T preserves length T ( v ⃗ ) T \left( \vec{v} \right) T ( v ) and T ( w ⃗ ) T \left( \vec{w} \right) T ( w ) are unit.
T : R n → R n T : \mathbb{R}^{n} \to \mathbb{R}^{n} T : R n → R n is an orthogonal transformation if and only if { T ( e ⃗ 1 ) , T ( e ⃗ 2 ) , ⋯ T ( e ⃗ n ) } \{ T \left( \vec{e}_1 \right) , T \left( \vec{e}_2 \right) , \cdots T \left( \vec{e}_n \right) \} { T ( e 1 ) , T ( e 2 ) , ⋯ T ( e n ) } is an orthonormal basis for R n R^{n} R n .
The columns of an n × n n\times n n × n orthogonal matrix form an orthonormal basis for R n \mathbb{R}^{n} R n .
Recall: QR Factorization if A A A has linearly independent columns, we may write A = Q R A=QR A = QR where Q Q Q has orthonormal columns and R = Q T A R = Q^{T}A R = Q T A .
Definition:
Consider an m × n m\times n m × n matrix A A A , the transpose A T A^{T} A T is the n × m n\times m n × m matrix such that (i, j)-entry of A T A^{T} A T is the (j, i)-entry of A A A .
In other words: interchange rows and columns
Example
A = [ 2 4 7 0 1 0 2 1 ] A = \begin{bmatrix} 2 & 4 \\ 7 & 0 \\ 1 & 0 \\ 2 & 1 \end{bmatrix} A = ⎣ ⎡ 2 7 1 2 4 0 0 1 ⎦ ⎤ and B = [ 1 3 3 2 ] B = \begin{bmatrix} 1 & 3 \\ 3 & 2 \end{bmatrix} B = [ 1 3 3 2 ] . Find A T A^{T} A T and B T B^{T} B T .
A T = [ 2 7 1 2 4 0 0 1 ] A^{T} = \begin{bmatrix} 2 & 7 & 1 & 2 \\ 4 & 0 & 0 & 1 \end{bmatrix} A T = [ 2 4 7 0 1 0 2 1 ]
B T = [ 1 3 3 2 ] = B B^{T} = \begin{bmatrix} 1 & 3 \\ 3 & 2 \end{bmatrix} = B B T = [ 1 3 3 2 ] = B
Note: for any A A A , im ( A T ) = row ( A ) \text{im}\left( A^{T} \right) = \text{row }\left( A \right) im ( A T ) = row ( A ) (row space of A A A )
Definition:
A square matrix A A A is
symmetric provided A T = A A^{T} = A A T = A
skew-symmetric provided A T = − A A^{T} = -A A T = − A
Properties: (1, 2, 3 for any matrices such that operations are defined. 4 provided A A A is n × n n\times n n × n and invertible)
( A + B ) T = A T + B T \left( A +B \right) ^{T} = A^T + B^{T} ( A + B ) T = A T + B T
( A B ) T = B T A T \left( AB \right) ^{T} = B^{T}A^{T} ( A B ) T = B T A T
rank ( A T ) = rank ( A ) \text{rank}\left( A^{T} \right) = \text{rank}\left( A \right) rank ( A T ) = rank ( A )
( A − 1 ) T = ( A T ) − 1 \left( A^{-1} \right) ^{T} = \left( A^{T} \right) ^{-1} ( A − 1 ) T = ( A T ) − 1
Proof of 2) Suppose A A A is m × p m\times p m × p with A = [ – w ⃗ 1 – ⋮ – m ⃗ m – ] A = \begin{bmatrix} – & \vec{w}_1 & – \\ & \vdots & \\ – & \vec{m}_m & – \end{bmatrix} A = ⎣ ⎡ – – w 1 ⋮ m m – – ⎦ ⎤ and B B B is p × n p\times n p × n with B = [ ∣ ∣ v ⃗ 1 ⋯ v ⃗ m ∣ ∣ ] B = \begin{bmatrix} | & & | \\ \vec{v}_1 & \cdots & \vec{v}_m \\ | & & | \end{bmatrix} B = ⎣ ⎡ ∣ v 1 ∣ ⋯ ∣ v m ∣ ⎦ ⎤ .
B T = [ – v ⃗ 1 T – – v ⃗ 2 T – ⋮ – v ⃗ n T – ] B^{T} = \begin{bmatrix} – & \vec{v}_1 ^{T} & – \\ – & \vec{v}_2 ^{T} & – \\ & \vdots & \\ – & \vec{v}_n ^{T} & – \end{bmatrix} B T = ⎣ ⎡ – – – v 1 T v 2 T ⋮ v n T – – – ⎦ ⎤
A T = [ ∣ ∣ w ⃗ 1 ⋯ w ⃗ m ∣ ∣ ] A^{T} = \begin{bmatrix} | & & | \\ \vec{w}_1 & \cdots & \vec{w}_m \\ | & & | \end{bmatrix} A T = ⎣ ⎡ ∣ w 1 ∣ ⋯ ∣ w m ∣ ⎦ ⎤
( i , j ) (i, j) ( i , j ) -entry of ( A B ) T (AB)^{T} ( A B ) T : ( j j i ) (jji) ( jji ) -entry of A B AB A B – w ⃗ j ⋅ v ⃗ i \vec{w}_j \cdot \vec{v}_i w j ⋅ v i
( i , j ) \left( i, j \right) ( i , j ) -entry of B T A T B^{T}A^{T} B T A T : v ⃗ i T ⋅ w ⃗ j = v ⃗ j ⋅ w ⃗ j = w ⃗ j ⋅ v ⃗ i \vec{v}_i ^{T} \cdot \vec{w}_j = \vec{v}_j \cdot \vec{w}_j = \vec{w}_j \cdot \vec{v}_i v i T ⋅ w j = v j ⋅ w j = w j ⋅ v i
Dot product does not distinguish between rows and columns
Example
Verify that ( A − 1 ) T = ( A T ) − 1 \left( A^{-1} \right) ^{T} = \left( A^{T} \right) ^{-1} ( A − 1 ) T = ( A T ) − 1 for the matrix A = [ 2 1 0 − 1 ] A = \begin{bmatrix} 2 & 1 \\ 0 & -1 \end{bmatrix} A = [ 2 0 1 − 1 ] .
Recall: [ a b c d ] − 1 = 1 a d − b c [ d − b − c a ] \begin{bmatrix} a & b \\ c & d \end{bmatrix} ^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} [ a c b d ] − 1 = a d − b c 1 [ d − c − b a ]
( A − 1 ) T = ( 1 − 2 [ − 1 − 1 0 2 ] ) T = [ 1 2 1 2 0 − 1 ] T = [ 1 2 0 1 2 − 1 ] \left( A^{-1} \right) ^{T} = \left( \frac{1}{-2} \begin{bmatrix} -1 & -1 \\ 0 & 2 \end{bmatrix} \right) ^{T} = \begin{bmatrix} \frac{1}{2} & \frac{1}{2} \\ 0 & -1 \end{bmatrix} ^{T} = \begin{bmatrix} \frac{1}{2} & 0 \\ \frac{1}{2} & -1 \end{bmatrix} ( A − 1 ) T = ( − 2 1 [ − 1 0 − 1 2 ] ) T = [ 2 1 0 2 1 − 1 ] T = [ 2 1 2 1 0 − 1 ]
( A T ) − 1 = [ 2 0 1 − 1 ] − 1 = 1 − 2 [ − 1 0 − 1 2 ] = [ 1 2 0 1 2 − 1 ] \left( A^{T} \right) ^{-1} = \begin{bmatrix} 2 & 0 \\ 1 & -1 \end{bmatrix} ^{-1} = \frac{1}{-2} \begin{bmatrix} -1 & 0 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} \frac{1}{2} & 0 \\ \frac{1}{2} & -1 \end{bmatrix} ( A T ) − 1 = [ 2 1 0 − 1 ] − 1 = − 2 1 [ − 1 − 1 0 2 ] = [ 2 1 2 1 0 − 1 ]
Note: det ( A ) = det ( A T ) \text{det}\left(A \right) = \text{det}\left( A^{T} \right) det ( A ) = det ( A T )
Exercise : Suppose A A A and B B B are n × n n\times n n × n orthogonal matrices, which of the following must be orthogonal?
2 B , A B 2 , A − B 2B , AB^2 , A -B 2 B , A B 2 , A − B
2B: Columns are not unit
A B 2 AB^2 A B 2 : Yes; B 2 = B B B^2 = BB B 2 = BB orthogonal
A − B A-B A − B : Columns are not unit
Suppose A A A and B B B are n × n n\times n n × n symmetric matrices, which of the following must be symmetric?
2 B , A B 2 , A − B 2B , AB^2 , A-B 2 B , A B 2 , A − B
( 2 B ) T = 2 B T = 2 B (2B)^T = 2B^T = 2B ( 2 B ) T = 2 B T = 2 B Yes
( A B 2 ) T = ( B 2 ) T A T = B T B T A T = B 2 A (AB^2)^T = \left( B^{2} \right) ^{T} A^{T} = B^{T}B^{T}A^{T} = B^{2}A ( A B 2 ) T = ( B 2 ) T A T = B T B T A T = B 2 A No
( A − B ) T = A T − B T = A − B (A-B)^{T} = A^{T} - B^{T} = A-B ( A − B ) T = A T − B T = A − B Yes
Theorem : For an n × n n\times n n × n matrix A A A , A A A is an orthogonal matrix:
If and only if A T A = I n A^{T}A = I_{n} A T A = I n and
If and only if A T = A − 1 A^{T} = A^{-1} A T = A − 1
Note: (2) follows from (1) (Criterion for infertility)
Proof of (1): Suppose A A A is n × n n\times n n × n with A = [ ∣ ∣ ∣ v ⃗ 1 v ⃗ 2 ⋯ v ⃗ n ∣ ∣ ∣ ] A = \begin{bmatrix} | & | & & | \\ \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_n \\ | & | & & | \end{bmatrix} A = ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v n ∣ ⎦ ⎤ .
A T A A^{T}A A T A has (i, j)-entry v ⃗ i T ⋅ v ⃗ j = v ⃗ i ⋅ v ⃗ j \vec{v}_i^T \cdot \vec{v}_j = \vec{v}_i \cdot \vec{v}_j v i T ⋅ v j = v i ⋅ v j
A T A = I n A^{T}A = I_{n} A T A = I n if and only if v ⃗ i ⋅ v ⃗ j = { 1 i = j (unit) 0 i ≠ j Perpendicular \vec{v}_i \cdot \vec{v}_j = \begin{cases} 1 & i=j \text{(unit)} \\ 0 & i\neq j \text{Perpendicular} \end{cases} v i ⋅ v j = { 1 0 i = j (unit) i = j Perpendicular
Note: We can interpret the dot product as a matrix product. For x ⃗ = [ x 1 ⋮ x n ] \vec{x} = \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix} x = ⎣ ⎡ x 1 ⋮ x n ⎦ ⎤ and x ⃗ T = [ x 1 ⋯ x n ] \vec{x}^T = \begin{bmatrix} x_1 & \cdots & x_n \end{bmatrix} x T = [ x 1 ⋯ x n ]
For x ⃗ \vec{x} x and y ⃗ \vec{y} y in R n \mathbb{R}^{n} R n , x ⃗ ⋅ y ⃗ = [ x 1 ⋯ x n ] [ y 1 ⋮ y n ] = x ⃗ T y ⃗ \vec{x}\cdot \vec{y} = \begin{bmatrix} x_1 & \cdots & x_n \end{bmatrix} \begin{bmatrix} y_1 \\ \vdots \\ y_n \end{bmatrix} = \vec{x}^{T} \vec{y} x ⋅ y = [ x 1 ⋯ x n ] ⎣ ⎡ y 1 ⋮ y n ⎦ ⎤ = x T y
Theorem : If T T T is an orthogonal transformation then T T T preserves dot product, i.e. T ( x ⃗ ) ⋅ T ( y ⃗ ) = x ⃗ ⋅ y ⃗ T\left( \vec{x} \right) \cdot T\left( \vec{y} \right) = \vec{x} \cdot \vec{y} T ( x ) ⋅ T ( y ) = x ⋅ y .
Proof:
T ( x ⃗ ) ⋅ T ( y ⃗ ) = A x ⃗ ⋅ A y ⃗ = ( A x ⃗ ) T A y ⃗ = x ⃗ T A T A y ⃗ = x ⃗ T y ⃗ = x ⃗ ⋅ y ⃗ \begin{align*}
T(\vec{x}) \cdot T(\vec{y}) & = A\vec{x} \cdot A \vec{y} \\
& = (A\vec{x})^T A \vec{y} \\
& = \vec{x}^T A^T A \vec{y} \\
& = \vec{x}^T \vec{y} \\
& = \vec{x} \cdot \vec{y}
\end{align*} T ( x ) ⋅ T ( y ) = A x ⋅ A y = ( A x ) T A y = x T A T A y = x T y = x ⋅ y
Example
Let v ⃗ 1 = [ 1 1 1 1 ] \vec{v}_1 = \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} v 1 = ⎣ ⎡ 1 1 1 1 ⎦ ⎤ , v ⃗ 2 = [ 1 1 1 − 1 ] \vec{v}_2 = \begin{bmatrix} 1 \\ 1 \\ 1 \\ -1 \end{bmatrix} v 2 = ⎣ ⎡ 1 1 1 − 1 ⎦ ⎤ , y ⃗ 1 = [ 2 0 0 0 ] \vec{y}_1 = \begin{bmatrix} 2 \\ 0 \\ 0 \\ 0 \end{bmatrix} y 1 = ⎣ ⎡ 2 0 0 0 ⎦ ⎤ , y ⃗ 2 = [ 0 2 0 0 ] \vec{y}_2 = \begin{bmatrix} 0 \\ 2 \\ 0 \\ 0 \end{bmatrix} y 2 = ⎣ ⎡ 0 2 0 0 ⎦ ⎤ . Show there is no orthogonal transformation T : R 4 → R 4 T : \mathbb{R}^{4} \to \mathbb{R}^{4} T : R 4 → R 4 such that T ( v ⃗ 1 ) = y ⃗ 1 T\left( \vec{v}_1 \right) = \vec{y}_1 T ( v 1 ) = y 1 and T ( v ⃗ 2 ) = y ⃗ 2 T\left( \vec{v}_2 \right) = \vec{y}_2 T ( v 2 ) = y 2 .
We would need T ( v ⃗ 1 ) ⋅ T ( v ⃗ 2 ) = v ⃗ 1 ⋅ v ⃗ 2 T \left( \vec{v}_1 \right) \cdot T\left( \vec{v}_2 \right) = \vec{v}_1 \cdot \vec{v}_2 T ( v 1 ) ⋅ T ( v 2 ) = v 1 ⋅ v 2 .
v ⃗ 1 ⋅ v ⃗ 2 = 1 + 1 + 1 − 1 = 2 \vec{v}_1 \cdot \vec{v}_2 = 1 + 1 + 1 - 1 =2 v 1 ⋅ v 2 = 1 + 1 + 1 − 1 = 2
y ⃗ 1 ⋅ y ⃗ 2 = 0 ≠ 2 \vec{y}_1 \cdot \vec{y}_2 = 0 \neq 2 y 1 ⋅ y 2 = 0 = 2
No such orthogonal transformation exists.
Suppose T : R n → R n T : \mathbb{R}^{n}\to \mathbb{R}^{n} T : R n → R n is an orthogonal transformation. Show T T T preserves angles. That is, for any nonzero v ⃗ \vec{v} v and w ⃗ \vec{w} w in R n \mathbb{R}^{n} R n , the angle between T ( v ⃗ ) T\left( \vec{v} \right) T ( v ) and T ( w ⃗ ) T\left( \vec{w} \right) T ( w ) equals the angle between v ⃗ \vec{v} v and w ⃗ \vec{w} w .
cos − 1 ( v ⃗ ⋅ w ⃗ ∣ ∣ v ⃗ ∣ ∣ ⋅ ∣ ∣ w ⃗ ∣ ∣ ) = cos − 1 ( T ( v ⃗ ) ⋅ T ( w ⃗ ) ∣ ∣ T ( v ⃗ ) ∣ ∣ ⋅ ∣ ∣ T ( w ⃗ ) ∣ ∣ ) \cos ^{-1} \left( \frac{\vec{v}\cdot \vec{w}}{ \mid \mid \vec{v} \mid \mid \cdot \mid \mid \vec{w} \mid \mid } \right) = \cos ^{-1} \left( \frac{T\left( \vec{v} \right) \cdot T\left( \vec{w} \right) }{ \mid \mid T \left( \vec{v} \right) \mid \mid \cdot \mid \mid T \left( \vec{w} \right) \mid \mid } \right) cos − 1 ( ∣∣ v ∣∣ ⋅ ∣∣ w ∣∣ v ⋅ w ) = cos − 1 ( ∣∣ T ( v ) ∣∣ ⋅ ∣∣ T ( w ) ∣∣ T ( v ) ⋅ T ( w ) )
Question: Suppose T : R n → R n T : \mathbb{R}^{n} \to \mathbb{R}^{n} T : R n → R n preserves angles. Is T T T necessarily an orthogonal transformation?
Answer: No! Scaling by k k k preserves angle.
Review of ideas/terminology from 3.2, 3.3, 5.1 :
Question: What is the span of vectors in R n \mathbb{R}^{n} R n ?
Answer: All linear combinations
Question: What is a basis for a subspace W W W of R n \mathbb{R}^{n} R n ?
Answer: A (finite) collection B \mathcal{B} B of vectors in W W W such that:
B \mathcal{B} B is linearly independent
span ( B ) = W \text{span}\left( \mathcal{B} \right) = W span ( B ) = W
Example
Let W = { [ x y z ] ∈ R 3 : x = 0 } W = \{ \begin{bmatrix} x \\ y \\ z \end{bmatrix} \in \mathbb{R}^{3} : x = 0 \} W = { ⎣ ⎡ x y z ⎦ ⎤ ∈ R 3 : x = 0 } .
W = ker [ 1 0 0 ] W = \text{ker} \begin{bmatrix} 1 & 0 & 0 \end{bmatrix} W = ker [ 1 0 0 ]
x = 0 x = 0 x = 0
y = t y = t y = t (free)
z = r z = r z = r (free)
[ 0 t r ] = t [ 0 1 0 ] + r [ 0 0 1 ] \begin{bmatrix} 0 \\ t \\ r \end{bmatrix}
= t \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}
+ r \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} ⎣ ⎡ 0 t r ⎦ ⎤ = t ⎣ ⎡ 0 1 0 ⎦ ⎤ + r ⎣ ⎡ 0 0 1 ⎦ ⎤
Basis: { [ 0 1 0 ] , [ 0 0 1 ] } \{ \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \} { ⎣ ⎡ 0 1 0 ⎦ ⎤ , ⎣ ⎡ 0 0 1 ⎦ ⎤ }
dim ( W ) = 2 \text{dim}\left( W \right) = 2 dim ( W ) = 2
Note: This is not the only basis for W W W .
Let w ⃗ 1 = [ 0 1 1 ] \vec{w}_1 = \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} w 1 = ⎣ ⎡ 0 1 1 ⎦ ⎤ and w ⃗ 2 = [ 0 − 1 1 ] \vec{w}_2 = \begin{bmatrix} 0 \\ -1 \\ 1 \end{bmatrix} w 2 = ⎣ ⎡ 0 − 1 1 ⎦ ⎤ . Let’s verify B = { w ⃗ 1 , w ⃗ 2 } \mathcal{B} = \{ \vec{w}_1 , \vec{w}_2 \} B = { w 1 , w 2 } a basis for W = { [ x y z ] ∈ R 3 : c = 0 } W = \{ \begin{bmatrix} x \\ y \\ z \end{bmatrix} \in \mathbb{R}^{3} : c = 0 \} W = { ⎣ ⎡ x y z ⎦ ⎤ ∈ R 3 : c = 0 } .
Using only the definition of basis (and not the theory we will review)
Linear Independence: w ⃗ 1 \vec{w}_1 w 1 and w ⃗ 2 \vec{w}_2 w 2 are nonzero. w ⃗ 2 \vec{w}_2 w 2 is not a multiple of w ⃗ 1 \vec{w}_1 w 1 . No redundant vectors.
span ( B ) = W \text{span} \left( \mathcal{B} \right) = W span ( B ) = W
[ 0 y z ] = a [ 0 1 1 ] + b [ 0 − 1 1 ] \begin{bmatrix}
0 \\
y \\
z
\end{bmatrix}
= a \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}
+ b \begin{bmatrix} 0 \\ -1 \\ 1 \end{bmatrix} ⎣ ⎡ 0 y z ⎦ ⎤ = a ⎣ ⎡ 0 1 1 ⎦ ⎤ + b ⎣ ⎡ 0 − 1 1 ⎦ ⎤
[ 0 y z ] = y + z 2 [ 0 1 1 ] + z − y 2 [ 0 − 1 1 ] \begin{bmatrix} 0 \\ y \\ z \end{bmatrix}
=
\frac{y+z}{2} \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}
+ \frac{z-y}{2} \begin{bmatrix} 0 \\ -1 \\ 1 \end{bmatrix} ⎣ ⎡ 0 y z ⎦ ⎤ = 2 y + z ⎣ ⎡ 0 1 1 ⎦ ⎤ + 2 z − y ⎣ ⎡ 0 − 1 1 ⎦ ⎤
Find a a a and b b b .
a − b = y a - b = y a − b = y
a + b = z a + b = z a + b = z
2 a = y + z 2a = y+z 2 a = y + z
a = y + z 2 a = \frac{y+z}{2} a = 2 y + z
b = z − y + z 2 b = z - \frac{y+z}{2} b = z − 2 y + z
= z − y 2 = \frac{z-y}{2} = 2 z − y
Some theory from 3.3
Suppose we know dim ( W ) = m \text{dim} \left( W \right) = m dim ( W ) = m and B 1 \mathcal{B}_1 B 1 and B 2 \mathcal{B}_2 B 2 ⊆ W \subseteq W ⊆ W . If B 1 \mathcal{B}_1 B 1 is linearly independent and B 2 \mathcal{B}_2 B 2 spans W W W , then ∣ B 1 ∣ ≤ ∣ B 2 ∣ \mid \mathcal{B}_1 \mid \le \mid \mathcal{B}_2 \mid ∣ B 1 ∣≤∣ B 2 ∣ .
Any collection of m m m linearly independent vectors in W W W is a basis for W W W .
Any collection of m m m vectors that span W W W is a basis for W W W .
Example
{ [ 1 2 1 ] , [ 3 1 0 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix} , \begin{bmatrix} 3 \\ 1 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 1 2 1 ⎦ ⎤ , ⎣ ⎡ 3 1 0 ⎦ ⎤ } is not a basis for R 3 \mathbb{R}^{3} R 3 .
Vectors are independent. 2 Vectors cannot span R 3 \mathbb{R}^{3} R 3 .
Example
{ [ 1 2 1 ] , [ 3 1 0 ] , [ 5 0 0 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix} , \begin{bmatrix} 3 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 5 \\ 0 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 1 2 1 ⎦ ⎤ , ⎣ ⎡ 3 1 0 ⎦ ⎤ , ⎣ ⎡ 5 0 0 ⎦ ⎤ } is a basis for R 3 \mathbb{R}^{3} R 3 .
c 1 [ 1 2 1 ] + c 2 [ 3 1 0 ] + c 3 [ 5 0 0 ] = 0 ⃗ c_1 \begin{bmatrix} 1 \\ 2 \\1 \end{bmatrix}
+ c_2 \begin{bmatrix} 3 \\ 1 \\ 0 \end{bmatrix}
+ c_3 \begin{bmatrix} 5 \\ 0 \\ 0 \end{bmatrix}
= \vec{0} c 1 ⎣ ⎡ 1 2 1 ⎦ ⎤ + c 2 ⎣ ⎡ 3 1 0 ⎦ ⎤ + c 3 ⎣ ⎡ 5 0 0 ⎦ ⎤ = 0
3rd line c 1 = 0 c_1 =0 c 1 = 0
2nd line c 2 = 0 c_2 = 0 c 2 = 0
1st line 5 c 3 = 0 ⟹ c 3 = 0 5c_3 = 0 \implies c_3 =0 5 c 3 = 0 ⟹ c 3 = 0
Vectors are independent
dim ( R 3 ) = 3 \text{dim}\left( \mathbb{R}^{3} \right) = 3 dim ( R 3 ) = 3
Example
{ [ 1 2 1 ] , [ 3 1 0 ] , [ 5 0 0 ] , [ 1 1 1 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix} , \begin{bmatrix} 3 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 5 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} \} { ⎣ ⎡ 1 2 1 ⎦ ⎤ , ⎣ ⎡ 3 1 0 ⎦ ⎤ , ⎣ ⎡ 5 0 0 ⎦ ⎤ , ⎣ ⎡ 1 1 1 ⎦ ⎤ } is not a basis for R 3 \mathbb{R}^{3} R 3 .
Vectors span R 3 \mathbb{R}^{3} R 3 . 4 vectors cannot be independent in R 3 \mathbb{R}^{3} R 3 , however.
Question: How do we find the dimension of a subspace?
Answer: We can use Rank-Nullity Theorem. Suppose A A A is n × m n\times m n × m .
dim ( im ( A ) ) + dim ( ker ( A ) ) = m \text{dim} (\text{im} (A)) + \text{dim} (\text{ker} (A)) = m dim ( im ( A )) + dim ( ker ( A )) = m
If V = im ( A ) V = \text{im} \left( A \right) V = im ( A ) , then dim ( V ) = rank ( A ) \text{dim} \left( V \right) = \text{rank}\left( A \right) dim ( V ) = rank ( A )
If W = ker ( A ) W = \text{ker}\left( A \right) W = ker ( A ) , then dim ( W ) = m − rank ( A ) \text{dim}\left( W \right) = m - \text{rank}\left( A \right) dim ( W ) = m − rank ( A ) .
Question 3 #2: For Z = { [ x 1 x 2 x 3 ] ∈ R 3 : x 1 = 0 and x 2 + 5 x 3 = 0 } Z = \{ \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} \in \mathbb{R}^{3} : x_1 = 0 \text{ and } x_2 + 5x_3 = 0 \} Z = { ⎣ ⎡ x 1 x 2 x 3 ⎦ ⎤ ∈ R 3 : x 1 = 0 and x 2 + 5 x 3 = 0 } , dim ( Z ) = 1 \text{dim}\left( Z \right) =1 dim ( Z ) = 1 .
Z = ker ( [ 1 0 0 0 1 5 ] ) Z = \text{ker} \left( \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 5 \end{bmatrix} \right) Z = ker ( [ 1 0 0 1 0 5 ] )
Matrix has rank 2. dim ( Z ) = 3 − 2 = 1 \text{dim}\left( Z \right) = 3 - 2 =1 dim ( Z ) = 3 − 2 = 1
Quiz 3 #1B: The dimension of span { [ 1 0 1 ] , [ 0 0 0 ] , [ 0 2 0 ] , [ 4 4 4 ] , [ 3 − 2 3 ] } \text{span} \{ \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 2 \\ 0 \end{bmatrix} , \begin{bmatrix} 4 \\ 4 \\ 4 \end{bmatrix} , \begin{bmatrix} 3 \\ -2 \\ 3 \end{bmatrix} \} span { ⎣ ⎡ 1 0 1 ⎦ ⎤ , ⎣ ⎡ 0 0 0 ⎦ ⎤ , ⎣ ⎡ 0 2 0 ⎦ ⎤ , ⎣ ⎡ 4 4 4 ⎦ ⎤ , ⎣ ⎡ 3 − 2 3 ⎦ ⎤ } is 2.
[ 1 0 0 4 3 0 0 2 4 − 2 1 0 0 4 3 ] → [ 1 0 0 4 3 0 0 2 4 − 20 0 0 0 0 ] \begin{bmatrix}
1 & 0 & 0 & 4 & 3 \\
0 & 0 & 2 & 4 & -2 \\
1 & 0 & 0 & 4 & 3
\end{bmatrix}
\to
\begin{bmatrix}
1 & 0 & 0 & 4 & 3 \\
0 & 0 & 2 & 4 & -2
0 & 0 & 0 & 0 & 0
\end{bmatrix} ⎣ ⎡ 1 0 1 0 0 0 0 2 0 4 4 4 3 − 2 3 ⎦ ⎤ → [ 1 0 0 0 0 2 4 4 3 − 20 0 0 0 0 ]
Rank is 2.
dim ( im ( A ) ) = 2 < 3 \text{dim} \left( \text{im}\left( A \right) \right) = 2 < 3 dim ( im ( A ) ) = 2 < 3
im ( A ) ≠ R 3 \text{im}\left( A \right) \neq \mathbb{R}^{3} im ( A ) = R 3
Question: What is the orthogonal complement of a subspace V V V of R n \mathbb{R}^{n} R n ?
V ⊥ = { x ⃗ ∈ R n : x ⃗ ⋅ v ⃗ = 0 ∀ v ⃗ ∈ V } V^{\bot} = \{ \vec{x} \in \mathbb{R}^{n} : \vec{x} \cdot \vec{v} = 0 \forall \vec{v} \in V \} V ⊥ = { x ∈ R n : x ⋅ v = 0∀ v ∈ V }
V ⊥ V^{\bot} V ⊥ is a subspace of R n \mathbb{R}^{n} R n .
V ∩ V ⊥ = { 0 ⃗ } V \cap V^{\bot} = \{ \vec{0} \} V ∩ V ⊥ = { 0 }
dim ( V ) + dim ( V ⊥ ) = n \text{dim} \left( V \right) + \text{dim} \left( V^{\bot} \right) = n dim ( V ) + dim ( V ⊥ ) = n
In example: 2 + 1 = 3
Note:
x ⃗ \vec{x} x is in V ⊥ V^{\bot} V ⊥ if and only if x ⃗ ⋅ v ⃗ = 0 \vec{x} \cdot \vec{v} = 0 x ⋅ v = 0 for v ⃗ \vec{v} v in a basis for V V V .
For V V V and W W W subspaces, W = V ⊥ W = V^{\bot} W = V ⊥ if and only if every vector in a basis for W W W is perpendicular to every vector in a basis V V V .
Four subspaces of a matrix.
A ( n × m ) A (n \times m) A ( n × m )
im ( A ) ⊆ R n \text{im}\left( A \right) \subseteq \mathbb{R}^{n} im ( A ) ⊆ R n
ker ( A ) ⊆ R m \text{ker}\left( A \right) \subseteq \mathbb{R}^{m} ker ( A ) ⊆ R m
A T ( m × n ) A^{T} (m \times n) A T ( m × n )
im ( A T ) ⊆ R m \text{im}\left( A^{T} \right) \subseteq \mathbb{R}^{m} im ( A T ) ⊆ R m
ker ( A T ) ⊆ R n \text{ker}\left( A^{T} \right) \subseteq \mathbb{R}^{n} ker ( A T ) ⊆ R n
Properties:
Relationship:
ker ( A T ) = ( im ( A ) ) ⊥ \text{ker}\left( A^{T} \right) = \left( \text{im}\left( A \right) \right) ^{\bot} ker ( A T ) = ( im ( A ) ) ⊥ in R n \mathbb{R}^{n} R n (we use in 5.4)
ker ( A ) = ( im ( A T ) ) ⊥ \text{ker}\left( A \right) = \left( \text{im}\left( A^{T} \right) \right) ^{\bot} ker ( A ) = ( im ( A T ) ) ⊥
Example
A = [ 1 0 0 0 1 0 ] A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix} A = [ 1 0 0 1 0 0 ]
A T = [ 1 0 0 1 0 0 ] A^{T}= \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 0 & 0 \end{bmatrix} A T = ⎣ ⎡ 1 0 0 0 1 0 ⎦ ⎤
Orthogonal complements
ker ( A T ) = { 0 ⃗ } \text{ker}\left( A^{T} \right) = \{ \vec{0} \} ker ( A T ) = { 0 }
im ( A ) = R 2 \text{im}\left( A \right) = \mathbb{R}^{2} im ( A ) = R 2
ker ( A ) = span { [ 0 0 1 ] } \text{ker}\left( A \right) = \text{span} \{ \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \} ker ( A ) = span { ⎣ ⎡ 0 0 1 ⎦ ⎤ }
im ( A T ) = span { [ 1 0 0 ] , [ 0 1 0 ] } \text{im}\left( A^{T} \right) = \text{span} \{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \} im ( A T ) = span { ⎣ ⎡ 1 0 0 ⎦ ⎤ , ⎣ ⎡ 0 1 0 ⎦ ⎤ }
In 5.4 we will use im ( A ) ⊥ = ker ( A T ) \text{im}\left( A \right) ^{\bot} = \text{ker}\left( A^{T} \right) im ( A ) ⊥ = ker ( A T )
Example
A = [ 1 0 0 2 0 0 0 1 0 0 1 0 ] A = \begin{bmatrix} 1 & 0 & 0 \\ 2 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 0 \end{bmatrix} A = ⎣ ⎡ 1 2 0 0 0 0 1 1 0 0 0 0 ⎦ ⎤ . Verify that im ( A ) ⊥ = ker ( A T ) \text{im}\left( A \right) ^{\bot} = \text{ker}\left( A^{T} \right) im ( A ) ⊥ = ker ( A T ) .
A T = [ 1 2 0 0 0 0 1 1 0 0 0 0 ] A^{T} = \begin{bmatrix} 1 & 2 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{bmatrix} A T = ⎣ ⎡ 1 0 0 2 0 0 0 1 0 0 1 0 ⎦ ⎤
ker ( A T ) \text{ker}\left( A^{T} \right) ker ( A T ) :
x 2 = t x_2 = t x 2 = t
x 4 = r x_4 = r x 4 = r
x 1 = − 2 t x_1 = -2t x 1 = − 2 t
x 3 = − r x_3 = -r x 3 = − r
[ − 2 t t − r r ] = t [ − 2 1 0 0 ] + r [ 0 0 − 1 1 ] \begin{bmatrix}
-2t \\
t \\
-r \\
r
\end{bmatrix}
= t \begin{bmatrix}
-2 \\
1 \\
0 \\
0
\end{bmatrix}
+ r \begin{bmatrix} 0 \\ 0 \\ -1 \\ 1 \end{bmatrix} ⎣ ⎡ − 2 t t − r r ⎦ ⎤ = t ⎣ ⎡ − 2 1 0 0 ⎦ ⎤ + r ⎣ ⎡ 0 0 − 1 1 ⎦ ⎤
Basis: { [ − 2 1 0 0 ] , [ 0 0 − 1 1 ] } \{ \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ -1 \\ 1 \end{bmatrix} \} { ⎣ ⎡ − 2 1 0 0 ⎦ ⎤ , ⎣ ⎡ 0 0 − 1 1 ⎦ ⎤ }
im ( A ) \text{im}\left( A \right) im ( A ) : Basis: { [ 1 2 0 0 ] , [ 0 0 1 1 ] } \{ \begin{bmatrix} 1 \\ 2 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 1 \\ 1 \end{bmatrix} \} { ⎣ ⎡ 1 2 0 0 ⎦ ⎤ , ⎣ ⎡ 0 0 1 1 ⎦ ⎤ }
Notice: Each element in basis for im ( A ) \text{im}\left( A \right) im ( A ) is perpendicular to each element in a basis for ker ( A T ) \text{ker}\left( A^{T} \right) ker ( A T ) .
5.4 Least Squares and Data Fitting 5.4 Least Squares and Data Fitting
Suppose A A A is n × m n\times m n × m matrix. For b ⃗ \vec{b} b in R n \mathbb{R}^{n} R n , the system A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b may have no solution. That is, b ∉ A b \not\in A b ∈ A .
Question: How do we find a vector in R m \mathbb{R}^{m} R m that is “almost” a solution?
We want: x ⃗ ⋆ ∈ R m \vec{x}^{\star} \in \mathbb{R}^{m} x ⋆ ∈ R m that makes ∣ ∣ b ⃗ − A x ⃗ ⋆ ∣ ∣ \mid \mid \vec{b} - A \vec{x}^{\star} \mid \mid ∣∣ b − A x ⋆ ∣∣ as small as possible.
proj im ( A ) b ⃗ = A x ⃗ ⋆ \text{proj}_{\text{im}\left( A \right) } \vec{b} = A \vec{x}^{\star} proj im ( A ) b = A x ⋆ for some x ⃗ ⋆ \vec{x}^{\star} x ⋆ in R m \mathbb{R}^{m} R m . This x ⃗ ⋆ \vec{x}^{\star} x ⋆ is a least squares solution .
Without using any theory, too many steps involved:
Find orthonormal basis for im ( A ) \text{im}\left( A \right) im ( A ) . Using Gram-Schmidt Process.
Project b ⃗ \vec{b} b onto im ( A ) \text{im}\left( A \right) im ( A ) . Using the orthonormal basis.
Solve linear system A x ⃗ = proj im ( A ) ( b ⃗ ) A\vec{x} = \text{proj}_{\text{im}\left( A \right)} \left( \vec{b} \right) A x = proj im ( A ) ( b ) . Using Gauss Jordan Elimination.
How to find x ⃗ ⋆ \vec{x}^{\star} x ⋆ : A x ⃗ ⋆ A\vec{x}^{\star} A x ⋆ is the vector in im ( A ) \text{im}\left( A \right) im ( A ) closest to b ⃗ ↔ A x ⃗ ⋆ = proj im ( A ) ( b ⃗ ) \vec{b} \leftrightarrow A\vec{x}^{\star} = \text{proj}_{\text{im}\left( A \right)}\left( \vec{b} \right) b ↔ A x ⋆ = proj im ( A ) ( b ) .
b ⃗ − A x ⃗ ⋆ \vec{b} - A\vec{x}^{\star} b − A x ⋆ is in ( im ( A ) ) ⊥ \left( \text{im}\left( A \right) \right) ^{\bot} ( im ( A ) ) ⊥
b ⃗ − A x ⃗ ⋆ \vec{b} - A \vec{x}^{\star} b − A x ⋆ is in ker ( A T ) \text{ker}\left( A^{T} \right) ker ( A T )
A T ( b ⃗ − A x ⃗ ⋆ ) = 0 ⃗ ↔ A T b ⃗ − A T A x ⃗ ⋆ = 0 ⃗ A^{T}\left( \vec{b} - A\vec{x}^{\star} \right) = \vec{0} \leftrightarrow A^{T}\vec{b} - A^{T}A \vec{x}^{\star} = \vec{0} A T ( b − A x ⋆ ) = 0 ↔ A T b − A T A x ⋆ = 0
( A T A ) x ⃗ ⋆ = ( A T b ⃗ ) \left( A^{T}A \right) \vec{x}^{\star} = \left( A^{T} \vec{b} \right) ( A T A ) x ⋆ = ( A T b )
Definition:
The least squared solutions of the system A x ⃗ = b ⃗ A\vec{x}=\vec{b} A x = b are the solutions to the system
A T A x ⃗ = A T b ⃗ A^{T} A \vec{x} = A^T \vec{b} A T A x = A T b
(Called the normal equation of the system A x ⃗ = b ⃗ A\vec{x}= \vec{b} A x = b )
Method of Least Squares: If A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b is inconsistent, multiply by A T A^{T} A T and solve: A T A x ⃗ = A T b ⃗ A^{T}A\vec{x} = A^{T}\vec{b} A T A x = A T b
Note: The normal equation is always consistent.
5.4 #20: Let A = [ 1 1 1 0 0 1 ] A = \begin{bmatrix} 1 & 1 \\ 1 & 0 \\ 0 & 1 \end{bmatrix} A = ⎣ ⎡ 1 1 0 1 0 1 ⎦ ⎤ and b ⃗ = [ 3 3 3 ] \vec{b} = \begin{bmatrix} 3 \\ 3 \\ 3 \end{bmatrix} b = ⎣ ⎡ 3 3 3 ⎦ ⎤ . Find the least squares solution x ⃗ ⋆ \vec{x}^{\star} x ⋆ of the system A x ⃗ = b ⃗ A\vec{x}= \vec{b} A x = b .
Verify b ⃗ − A x ⃗ ⋆ \vec{b} - A\vec{x}^{\star} b − A x ⋆ is perpendicular to the image of A A A . A T A x ⃗ = A T b ⃗ A^{T}A \vec{x} = A^{T}\vec{b} A T A x = A T b
A T A = [ 1 1 0 1 0 1 ] [ 1 1 1 0 0 1 ] = [ 2 1 1 2 ] A^{T}A = \begin{bmatrix} 1 & 1 & 0 \\ 1 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix} A T A = [ 1 1 1 0 0 1 ] ⎣ ⎡ 1 1 0 1 0 1 ⎦ ⎤ = [ 2 1 1 2 ]
[ 2 1 1 2 ] [ x 1 x 2 ] = [ 6 6 ] \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = \begin{bmatrix} 6 \\ 6 \end{bmatrix} [ 2 1 1 2 ] [ x 1 x 2 ] = [ 6 6 ]
A T b ⃗ = [ 1 1 0 1 0 1 ] [ 3 3 3 ] = [ 6 6 ] A^{T}\vec{b} = \begin{bmatrix} 1 & 1 & 0 \\ 1 & 0 & 1 \end{bmatrix} \begin{bmatrix} 3 \\ 3 \\ 3 \end{bmatrix} = \begin{bmatrix} 6 \\ 6 \end{bmatrix} A T b = [ 1 1 1 0 0 1 ] ⎣ ⎡ 3 3 3 ⎦ ⎤ = [ 6 6 ]
( A T A ) − 1 = 1 4 − 1 [ 2 − 1 − 1 2 ] = [ 2 3 − 1 3 − 1 3 2 3 ] \left( A^{T}A \right) ^{-1} = \frac{1}{4-1} \begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} \frac{2}{3} & -\frac{1}{3} \\ -\frac{1}{3} & \frac{2}{3} \end{bmatrix} ( A T A ) − 1 = 4 − 1 1 [ 2 − 1 − 1 2 ] = [ 3 2 − 3 1 − 3 1 3 2 ]
x ⃗ ⋆ = [ 2 3 − 1 3 − 1 3 2 3 ] [ 6 6 ] = [ 2 2 ] \vec{x}^{\star} = \begin{bmatrix} \frac{2}{3} & -\frac{1}{3} \\ -\frac{1}{3} & \frac{2}{3} \end{bmatrix} \begin{bmatrix} 6 \\ 6 \end{bmatrix} = \begin{bmatrix} 2 \\ 2 \end{bmatrix} x ⋆ = [ 3 2 − 3 1 − 3 1 3 2 ] [ 6 6 ] = [ 2 2 ] (Least squares solution)
b ⃗ − A x ⃗ = [ 3 3 3 ] − [ 1 1 1 0 0 1 ] [ 2 2 ] = [ 3 3 3 ] − [ 4 2 2 ] = [ − 1 1 1 ] \vec{b} - A\vec{x} = \begin{bmatrix} 3 \\ 3 \\ 3 \end{bmatrix} - \begin{bmatrix} 1 & 1 \\ 1 & 0\\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2 \\ 2 \end{bmatrix} = \begin{bmatrix} 3 \\ 3 \\ 3 \end{bmatrix} - \begin{bmatrix} 4 \\ 2 \\ 2 \end{bmatrix} = \begin{bmatrix} -1 \\ 1 \\ 1 \end{bmatrix} b − A x = ⎣ ⎡ 3 3 3 ⎦ ⎤ − ⎣ ⎡ 1 1 0 1 0 1 ⎦ ⎤ [ 2 2 ] = ⎣ ⎡ 3 3 3 ⎦ ⎤ − ⎣ ⎡ 4 2 2 ⎦ ⎤ = ⎣ ⎡ − 1 1 1 ⎦ ⎤ (Notice this is orthogonal to each column of A A A )
Example
Find the closest line to points (-1, 6), (1, 0), (2, 4).
f ( t ) = c 0 + c 1 t f(t) = c_0 + c_1 t f ( t ) = c 0 + c 1 t
6 = c 0 − c 1 6 = c_0 - c_1 6 = c 0 − c 1
0 = c 0 + c 1 0 = c_0 + c_1 0 = c 0 + c 1
4 = c 0 + 2 c 1 4 = c_0 + 2c_1 4 = c 0 + 2 c 1
Inconsistent Linear System: [ 1 − 1 1 1 1 2 ] [ c 0 c 1 ] = [ 6 0 4 ] \begin{bmatrix} 1 & -1 \\ 1 & 1 \\ 1 & 2 \end{bmatrix} \begin{bmatrix} c_0 \\ c_1 \end{bmatrix} = \begin{bmatrix} 6 \\ 0 \\ 4 \end{bmatrix} ⎣ ⎡ 1 1 1 − 1 1 2 ⎦ ⎤ [ c 0 c 1 ] = ⎣ ⎡ 6 0 4 ⎦ ⎤
Solve A T A x ⃗ = A T b ⃗ A^{T}A\vec{x} = A^{T}\vec{b} A T A x = A T b
A T A = [ 1 1 1 − 1 1 2 ] [ 1 − 1 1 1 1 2 ] = [ 3 2 2 6 ] A^{T}A = \begin{bmatrix} 1 & 1 & 1 \\ -1 & 1 & 2 \end{bmatrix} \begin{bmatrix} 1 & -1 \\ 1 & 1 \\ 1 & 2 \end{bmatrix} = \begin{bmatrix} 3 & 2 \\ 2 & 6 \end{bmatrix} A T A = [ 1 − 1 1 1 1 2 ] ⎣ ⎡ 1 1 1 − 1 1 2 ⎦ ⎤ = [ 3 2 2 6 ]
A T b ⃗ = [ 1 1 1 − 1 1 2 ] [ 6 0 4 ] = [ 10 2 ] A^{T}\vec{b} = \begin{bmatrix} 1 & 1 & 1 \\ -1 & 1 & 2 \end{bmatrix} \begin{bmatrix} 6 \\ 0 \\ 4 \end{bmatrix} = \begin{bmatrix} 10 \\ 2 \end{bmatrix} A T b = [ 1 − 1 1 1 1 2 ] ⎣ ⎡ 6 0 4 ⎦ ⎤ = [ 10 2 ]
( A T A ) − 1 = 1 18 − 4 [ 6 − 2 − 2 3 ] = [ 6 14 − 2 14 − 2 14 3 14 ] \left( A^{T}A \right) ^{-1} = \frac{1}{18-4} \begin{bmatrix} 6 & -2 \\ -2 & 3 \end{bmatrix} = \begin{bmatrix} \frac{6}{14} & -\frac{2}{14} \\ -\frac{2}{14} & \frac{3}{14} \end{bmatrix} ( A T A ) − 1 = 18 − 4 1 [ 6 − 2 − 2 3 ] = [ 14 6 − 14 2 − 14 2 14 3 ]
x ⃗ ⋆ = [ 6 14 − 2 14 − 2 14 3 14 ] [ 10 2 ] = [ 4 − 1 ] \vec{x}^{\star} = \begin{bmatrix} \frac{6}{14} & -\frac{2}{14} \\ -\frac{2}{14} & \frac{3}{14} \end{bmatrix} \begin{bmatrix} 10 \\ 2 \end{bmatrix} = \begin{bmatrix} 4 \\ -1 \end{bmatrix} x ⋆ = [ 14 6 − 14 2 − 14 2 14 3 ] [ 10 2 ] = [ 4 − 1 ]
f ( t ) = 4 − t f(t) = 4 - t f ( t ) = 4 − t
Question: How close is b ⃗ \vec{b} b to A x ⃗ ⋆ A\vec{x}^{\star} A x ⋆ ?
b ⃗ − A x ⃗ ⋆ = [ 6 0 4 ] − [ 1 − 1 1 1 1 2 ] [ 4 − 1 ] = [ 6 0 4 ] − [ 5 3 2 ] = [ 1 − 3 2 ] \vec{b} - A\vec{x}^{\star} = \begin{bmatrix} 6 \\ 0 \\ 4 \end{bmatrix} - \begin{bmatrix} 1 & -1 \\ 1 & 1 \\ 1 & 2 \end{bmatrix} \begin{bmatrix} 4 \\ -1 \end{bmatrix} = \begin{bmatrix} 6 \\ 0 \\ 4 \end{bmatrix} - \begin{bmatrix} 5 \\ 3 \\ 2 \end{bmatrix} = \begin{bmatrix} 1 \\ -3 \\ 2 \end{bmatrix} b − A x ⋆ = ⎣ ⎡ 6 0 4 ⎦ ⎤ − ⎣ ⎡ 1 1 1 − 1 1 2 ⎦ ⎤ [ 4 − 1 ] = ⎣ ⎡ 6 0 4 ⎦ ⎤ − ⎣ ⎡ 5 3 2 ⎦ ⎤ = ⎣ ⎡ 1 − 3 2 ⎦ ⎤ (Gives vertical “errors” from points)
Definition:
Using the least squares method, the error is ∣ ∣ b ⃗ − A x ⃗ ⋆ ∣ ∣ \mid \mid \vec{b} - A\vec{x}^{\star} \mid \mid ∣∣ b − A x ⋆ ∣∣ .
In the above example:
∣ ∣ b ⃗ − A x ⃗ ⋆ ∣ ∣ = ∣ ∣ [ 1 − 2 2 ] ∣ ∣ = 1 + 9 + 4 = 14 \mid \mid \vec{b} - A\vec{x}^{\star} \mid \mid = \mid \mid \begin{bmatrix} 1 \\ -2 \\ 2 \end{bmatrix} \mid \mid = \sqrt{1 + 9 + 4} = \sqrt{14} ∣∣ b − A x ⋆ ∣∣=∣∣ ⎣ ⎡ 1 − 2 2 ⎦ ⎤ ∣∣= 1 + 9 + 4 = 14
Least squares method minimizes e 1 2 + e 2 2 + e 3 3 e_1^{2} + e_2^{2} + e_3^{3} e 1 2 + e 2 2 + e 3 3
Exercise Given A = [ 1 1 1 − 2 1 1 ] A = \begin{bmatrix} 1 & 1 \\ 1 & -2 \\ 1 & 1 \end{bmatrix} A = ⎣ ⎡ 1 1 1 1 − 2 1 ⎦ ⎤ and b ⃗ = [ 3 2 1 ] \vec{b} = \begin{bmatrix} 3 \\ 2 \\ 1 \end{bmatrix} b = ⎣ ⎡ 3 2 1 ⎦ ⎤ . Find the least squares solution x ⃗ ⋆ \vec{x}^{\star} x ⋆ of the system A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b .
Solve A T A x ⃗ = A T b ⃗ A^{T}A\vec{x} = A^{T}\vec{b} A T A x = A T b (Normal equation)
A T A = [ 1 1 1 1 − 2 1 ] [ 1 1 1 − 2 1 1 ] = [ 3 0 0 6 ] A^{T}A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & -2 & 1 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 1 & -2 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 3 & 0 \\ 0 & 6 \end{bmatrix} A T A = [ 1 1 1 − 2 1 1 ] ⎣ ⎡ 1 1 1 1 − 2 1 ⎦ ⎤ = [ 3 0 0 6 ]
A T b ⃗ = [ 1 1 1 1 − 2 1 ] [ 3 2 1 ] = [ 6 0 ] A^{T}\vec{b} = \begin{bmatrix} 1 & 1 & 1 \\ 1 & -2 & 1 \end{bmatrix} \begin{bmatrix} 3 \\ 2 \\ 1 \end{bmatrix} = \begin{bmatrix} 6 \\ 0 \end{bmatrix} A T b = [ 1 1 1 − 2 1 1 ] ⎣ ⎡ 3 2 1 ⎦ ⎤ = [ 6 0 ]
( A T A ) − 1 = 1 18 [ 6 0 0 3 ] = [ 1 3 0 0 1 6 ] \left( A^{T}A \right) ^{-1} = \frac{1}{18} \begin{bmatrix} 6 & 0 \\ 0 & 3 \end{bmatrix} = \begin{bmatrix} \frac{1}{3} & 0 \\ 0 & \frac{1}{6} \end{bmatrix} ( A T A ) − 1 = 18 1 [ 6 0 0 3 ] = [ 3 1 0 0 6 1 ]
x ⃗ ⋆ = [ 1 3 0 0 1 6 ] [ 6 0 ] = [ 2 0 ] \vec{x}^{\star} = \begin{bmatrix} \frac{1}{3} & 0 \\ 0 & \frac{1}{6} \end{bmatrix} \begin{bmatrix} 6 \\ 0 \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \end{bmatrix} x ⋆ = [ 3 1 0 0 6 1 ] [ 6 0 ] = [ 2 0 ]
Remark : In examples so far, our matrix A T A A^{T}A A T A was invertible and hence we had a unique least squares solution
A T A x ⃗ ⋆ = A T b ⃗ and A T A invertible → x ⃗ ⋆ = ( A T A ) − 1 A T b ⃗ . A^T A \vec{x}^{\star} = A^T \vec{b} \text{ and } A^T A \text{ invertible } \to \vec{x}^{\star} = \left( A^T A \right) ^{-1} A^T \vec{b}. A T A x ⋆ = A T b and A T A invertible → x ⋆ = ( A T A ) − 1 A T b .
Generally, there need not be a unique least squares solution.
One can show: For an n × m n\times m n × m matrix A A A , ker ( A T A ) = ker ( A ) \text{ker}\left( A^{T}A \right) = \text{ker}\left( A \right) ker ( A T A ) = ker ( A )
When A A A has linearly independent columns, A T A A^{T} A A T A is invertible.
A T A A^{T}A A T A is m × m m\times m m × m with ker ( A T A ) = { 0 ⃗ } → A T A \text{ker}\left( A^{T}A \right) = \{ \vec{0} \} \to A^{T}A ker ( A T A ) = { 0 } → A T A is invertible
When A A A has linearly dependent columns, A T A A^{T}A A T A is not invertible.
A T A A^{T}A A T A is m × m m\times m m × m with rank ( A T A ) < m \text{rank}\left( A^{T}A \right) < m rank ( A T A ) < m . The normal equation has at least one free variable (and is consistent always) we have infinitely many least squares solutions.
Example
Find the least squares solutions to A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b where A = [ 2 4 0 0 ] A = \begin{bmatrix} 2 & 4 \\ 0 & 0 \end{bmatrix} A = [ 2 0 4 0 ] and b ⃗ = [ 1 2 ] \vec{b} = \begin{bmatrix} 1 \\ 2 \end{bmatrix} b = [ 1 2 ] .
A T A = [ 2 0 4 0 ] [ 2 4 0 0 ] = [ 4 8 8 16 ] A^{T}A = \begin{bmatrix} 2 & 0 \\ 4 & 0 \end{bmatrix} \begin{bmatrix} 2 & 4 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 4 & 8 \\ 8 & 16 \end{bmatrix} A T A = [ 2 4 0 0 ] [ 2 0 4 0 ] = [ 4 8 8 16 ] (Not invertible)
A T b ⃗ = [ 2 0 4 0 ] [ 1 2 ] = [ 2 4 ] A^{T} \vec{b} = \begin{bmatrix} 2 & 0 \\ 4 & 0 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix} 2 \\ 4 \end{bmatrix} A T b = [ 2 4 0 0 ] [ 1 2 ] = [ 2 4 ]
[ 4 8 ∣ 2 8 16 ∣ 4 ] → [ 4 8 ∣ 2 0 0 ∣ 0 ] → [ 1 2 ∣ 1 2 0 0 ∣ 0 ] \begin{bmatrix} 4 & 8 & | & 2 \\ 8 & 16 & | & 4 \end{bmatrix} \to \begin{bmatrix} 4 & 8 & | & 2 \\ 0 & 0 & | & 0 \end{bmatrix} \to \begin{bmatrix} 1 & 2 & | & \frac{1}{2} \\ 0 & 0 & | & 0 \end{bmatrix} [ 4 8 8 16 ∣ ∣ 2 4 ] → [ 4 0 8 0 ∣ ∣ 2 0 ] → [ 1 0 2 0 ∣ ∣ 2 1 0 ]
x 1 = 1 2 − 2 t x_1 = \frac{1}{2} - 2t x 1 = 2 1 − 2 t
x 2 = t x_2 = t x 2 = t
[ 1 2 − 2 t t ] , t ∈ R \begin{bmatrix} \frac{1}{2} - 2t \\ t \end{bmatrix} , t \in \mathbb{R} [ 2 1 − 2 t t ] , t ∈ R (Least squares solutions)
Error:
b ⃗ − A x ⃗ ⋆ = [ 1 2 ] − [ 2 4 0 0 ] [ 1 2 − 2 t t ] = [ 1 2 ] − [ 1 − 4 t + 4 t 0 ] \vec{b} - A\vec{x}^{\star} = \begin{bmatrix} 1 \\ 2 \end{bmatrix} - \begin{bmatrix} 2 & 4 \\ 0 \\ 0 \end{bmatrix} \begin{bmatrix} \frac{1}{2} - 2t \\ t \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \end{bmatrix} - \begin{bmatrix} 1 - 4t + 4t \\ 0 \end{bmatrix} b − A x ⋆ = [ 1 2 ] − ⎣ ⎡ 2 0 0 4 ⎦ ⎤ [ 2 1 − 2 t t ] = [ 1 2 ] − [ 1 − 4 t + 4 t 0 ]
= [ 1 2 ] − [ 1 0 ] = [ 0 2 ] = \begin{bmatrix} 1 \\ 2 \end{bmatrix} - \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 2 \end{bmatrix} = [ 1 2 ] − [ 1 0 ] = [ 0 2 ] (Error: 2)
In the above example, we can solve using our original discussion of least squares. Solve the linear system A x ⃗ = proj im ( A ) ( b ⃗ ) A\vec{x} = \text{proj}_{\text{im}\left( A \right) }\left( \vec{b} \right) A x = proj im ( A ) ( b ) (We’ll get the same answer):
A = [ 2 4 0 0 ] A = \begin{bmatrix} 2 & 4 \\ 0 & 0 \end{bmatrix} A = [ 2 0 4 0 ] and b ⃗ = [ 1 2 ] \vec{b} = \begin{bmatrix} 1 \\ 2 \end{bmatrix} b = [ 1 2 ]
im ( A ) = span { [ 1 0 ] } \text{im}\left( A \right) = \text{span} \{ \begin{bmatrix} 1 \\ 0 \end{bmatrix} \} im ( A ) = span { [ 1 0 ] }
proj im ( A ) ( b ⃗ ) = [ 1 0 ] \text{proj}_{\text{im}\left( A \right) } \left( \vec{b} \right) = \begin{bmatrix} 1 \\ 0 \end{bmatrix} proj im ( A ) ( b ) = [ 1 0 ]
[ 2 4 0 0 ] [ x 1 x 2 ] = [ 1 0 ] \begin{bmatrix} 2 & 4 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \end{bmatrix} [ 2 0 4 0 ] [ x 1 x 2 ] = [ 1 0 ]
[ 2 4 ∣ 1 0 0 ∣ 0 ] → [ 1 2 ∣ 1 2 0 0 ∣ 0 ] \begin{bmatrix}
2 & 4 & | & 1 \\
0 & 0 & | & 0
\end{bmatrix}
\to
\begin{bmatrix}
1 & 2 & | & \frac{1}{2} \\
0 & 0 & | & 0
\end{bmatrix} [ 2 0 4 0 ∣ ∣ 1 0 ] → [ 1 0 2 0 ∣ ∣ 2 1 0 ]
x 1 = 1 2 − 2 t x_1 = \frac{1}{2} - 2t x 1 = 2 1 − 2 t
x 2 = t x_2 = t x 2 = t (free)
[ 1 2 − 2 t t ] , t ∈ R \begin{bmatrix} \frac{1}{2} - 2t \\ t \end{bmatrix} , t \in \mathbb{R} [ 2 1 − 2 t t ] , t ∈ R
6.1/6.2 Determinants 6.1/6.2 Determinants
Suppose A A A is n × n n\times n n × n . The determinant of A A A is a number such that A A A is invertible if and only if det ( A ) ≠ 0 \text{det}\left( A \right) \neq 0 det ( A ) = 0 .
Notation : det ( A ) \text{det}\left( A \right) det ( A ) or ∣ A ∣ \mid A \mid ∣ A ∣
The determinant of a 2 × 2 2 \times 2 2 × 2 matrix ∣ a b c d ∣ = a d − b c \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad-bc ∣ ∣ a c b d ∣ ∣ = a d − b c .
Determent Nat have many properties that help us compute ∣ A ∣ \mid A \mid ∣ A ∣ for an n × n n\times n n × n matrix A A A .
∣ I n ∣ = 1 \mid I_{n} \mid =1 ∣ I n ∣= 1 ; ∣ 1 0 0 1 ∣ = 1 − 0 = 1 \begin{vmatrix} 1 & 0 \\ 0 & 1 \end{vmatrix} = 1-0 =1 ∣ ∣ 1 0 0 1 ∣ ∣ = 1 − 0 = 1
Determinant changes sign when you interchange 2 rows.
∣ c d a b ∣ = c b − a d = − ( a d − b c ) = − ∣ a b c d ∣ \begin{vmatrix} c & d \\ a & b \end{vmatrix} = c b - ad = - \left( ad - bc \right) = - \begin{vmatrix} a & b \\ c & d \end{vmatrix} ∣ ∣ c a d b ∣ ∣ = c b − a d = − ( a d − b c ) = − ∣ ∣ a c b d ∣ ∣
Example
∣ 1 0 0 0 0 1 0 1 0 ∣ = − ∣ 1 0 0 0 1 0 0 1 ∣ = − 1 \begin{vmatrix} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{vmatrix} = - \begin{vmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 \end{vmatrix} = -1 ∣ ∣ 1 0 0 0 0 1 0 1 0 ∣ ∣ = − ∣ ∣ 1 0 0 0 1 1 0 0 ∣ ∣ = − 1
Determent is linear in each row separately:
∣ k a k b c d ∣ = k a d − k b c = k ( a d − b c ) = k ∣ a b c d ∣ \begin{vmatrix} ka & kb \\ c & d \end{vmatrix} = ka d - kbc = k \left( ad - bc \right) = k \begin{vmatrix}a & b \\ c & d \end{vmatrix} ∣ ∣ ka c kb d ∣ ∣ = ka d − kb c = k ( a d − b c ) = k ∣ ∣ a c b d ∣ ∣
∣ a 1 + a 2 b 1 + b 2 c d ∣ = ( a 1 + a 2 ) d − ( b 1 + b 2 ) c = a 1 d − b 1 c + a 2 d − b 2 c = ∣ a 1 b 1 c d ∣ + ∣ a 2 b 2 c d ∣ \begin{vmatrix} a_1 + a_2 & b_1 + b_2 \\ c & d \end{vmatrix} = \left( a_1 + a_2 \right) d - \left( b_1 + b_2 \right) c = a_1 d - b_1 c + a_2d - b_2 c = \begin{vmatrix} a_1 & b_1 \\ c & d \end{vmatrix} + \begin{vmatrix} a_2 & b_2 \\ c & d \end{vmatrix} ∣ ∣ a 1 + a 2 c b 1 + b 2 d ∣ ∣ = ( a 1 + a 2 ) d − ( b 1 + b 2 ) c = a 1 d − b 1 c + a 2 d − b 2 c = ∣ ∣ a 1 c b 1 d ∣ ∣ + ∣ ∣ a 2 c b 2 d ∣ ∣
Example
[ 5 5 10 15 ] = 5 [ 1 1 2 3 ] \begin{bmatrix} 5 & 5 \\ 10 & 15 \end{bmatrix} = 5 \begin{bmatrix} 1 & 1 \\ 2 & 3 \end{bmatrix} [ 5 10 5 15 ] = 5 [ 1 2 1 3 ] . But ∣ 5 5 10 15 ∣ ≠ 5 ∣ 1 1 2 3 ∣ \begin{vmatrix} 5 & 5 \\ 10 & 15 \end{vmatrix} \neq 5 \begin{vmatrix} 1 & 1 \\ 2 & 3 \end{vmatrix} ∣ ∣ 5 10 5 15 ∣ ∣ = 5 ∣ ∣ 1 2 1 3 ∣ ∣
∣ 5 5 10 15 ∣ = 5 ( 15 ) − 5 ( 10 ) = 5 ( 5 ) = 5 2 \begin{vmatrix} 5 & 5 \\ 10 & 15 \end{vmatrix} = 5 \left( 15 \right) - 5 \left( 10 \right) = 5(5) = 5^{2} ∣ ∣ 5 10 5 15 ∣ ∣ = 5 ( 15 ) − 5 ( 10 ) = 5 ( 5 ) = 5 2
∣ 1 1 2 3 ∣ = 3 − 2 = 1 \begin{vmatrix} 1 & 1 \\ 2 & 3 \end{vmatrix} = 3-2=1 ∣ ∣ 1 2 1 3 ∣ ∣ = 3 − 2 = 1
Example: If A A A is b × b b\times b b × b , then det ( 3 A ) = 3 6 det ( A ) \text{det}\left( 3A \right) = 3^{6} \text{det}\left( A \right) det ( 3 A ) = 3 6 det ( A ) .
Example
∣ 0 0 1 0 2 0 − 1 0 0 ∣ = − ∣ − 1 0 0 0 2 0 0 0 1 ∣ = ∣ 1 0 0 0 2 0 0 0 1 ∣ = 2 ∣ 1 0 0 0 1 0 0 0 1 ∣ = 2 \begin{vmatrix} 0 & 0 & 1 \\ 0 & 2 & 0 \\ -1 & 0 & 0 \end{vmatrix} = - \begin{vmatrix} -1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 1 \end{vmatrix} = \begin{vmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 1 \end{vmatrix} = 2 \begin{vmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{vmatrix} = 2 ∣ ∣ 0 0 − 1 0 2 0 1 0 0 ∣ ∣ = − ∣ ∣ − 1 0 0 0 2 0 0 0 1 ∣ ∣ = ∣ ∣ 1 0 0 0 2 0 0 0 1 ∣ ∣ = 2 ∣ ∣ 1 0 0 0 1 0 0 0 1 ∣ ∣ = 2
If 2 rows of A A A are equal, the det ( A ) = 0 \text{det}\left( A \right) =0 det ( A ) = 0 (∣ a b a b ∣ = a b − a b = 0 \begin{vmatrix} a & b \\ a & b \end{vmatrix} = ab - ab = 0 ∣ ∣ a a b b ∣ ∣ = ab − ab = 0 )
Adding a multiple of one row to another row does not change the determinant. (∣ a b c + k a d + k b ∣ = ∣ a b c d ∣ + k ∣ a b a b ∣ = ∣ a b c d ∣ \begin{vmatrix} a & b \\ c+ka & d+kb \end{vmatrix} = \begin{vmatrix} a & b \\ c & d \end{vmatrix} + k \begin{vmatrix} ab \\ ab \end{vmatrix} = \begin{vmatrix} a & b \\ c & d \end{vmatrix} ∣ ∣ a c + ka b d + kb ∣ ∣ = ∣ ∣ a c b d ∣ ∣ + k ∣ ∣ ab ab ∣ ∣ = ∣ ∣ a c b d ∣ ∣ )
Example
∣ a b c 1 3 8 2 a + 1 2 b + 3 2 c + 8 ∣ = ∣ a b c 1 3 8 1 3 8 ∣ = 0 \begin{vmatrix} a & b & c \\ 1 & 3 & 8 \\ 2a+1 & 2b+3 & 2c + 8 \end{vmatrix} = \begin{vmatrix} a & b & c \\ 1 & 3 & 8 \\ 1 & 3 & 8 \end{vmatrix} = 0 ∣ ∣ a 1 2 a + 1 b 3 2 b + 3 c 8 2 c + 8 ∣ ∣ = ∣ ∣ a 1 1 b 3 3 c 8 8 ∣ ∣ = 0
Note:
We see how elementary row operations affect the determinant.
Interchange two rows: Change the sign of the determinant
Multiply a row by a nonzero constant k k k : multiplies the determinant by k k k
Add a multiple of one row to another: does not change the determinant
Example
Suppose A = [ − v ⃗ 1 − − v ⃗ 2 − − v ⃗ 3 − ] A = \begin{bmatrix} - & \vec{v}_1 & - \\ - & \vec{v}_2 & - \\ - & \vec{v}_3 & - \end{bmatrix} A = ⎣ ⎡ − − − v 1 v 2 v 3 − − − ⎦ ⎤ is 3 × 3 3\times 3 3 × 3 with det ( A ) = 6 \text{det}\left( A \right) =6 det ( A ) = 6 then,
∣ − v ⃗ 2 − − v ⃗ 1 − − v ⃗ 3 − ∣ = − 6 \begin{vmatrix} - & \vec{v}_2 & - \\ - & \vec{v}_1 & - \\ - & \vec{v}_3 & - \end{vmatrix} = -6 ∣ ∣ − − − v 2 v 1 v 3 − − − ∣ ∣ = − 6
∣ − v ⃗ 1 − − v ⃗ 2 − − v ⃗ 1 v ⃗ 2 v ⃗ 3 − ∣ = 6 \begin{vmatrix} - & \vec{v}_1 & - \\ - & \vec{v}_2 & - \\ - & \vec{v}_1 & \vec{v}_2 & \vec{v}_3 & - \end{vmatrix} = 6 ∣ ∣ − − − v 1 v 2 v 1 − − v 2 v 3 − ∣ ∣ = 6
Example
∣ 1 1 1 2 2 2 3 3 3 ∣ = ∣ 1 1 1 0 0 0 0 0 0 ∣ = 0 \begin{vmatrix} 1 & 1 & 1 \\ 2 & 2 & 2 \\ 3 & 3 & 3 \end{vmatrix} = \begin{vmatrix} 1 & 1 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{vmatrix} = 0 ∣ ∣ 1 2 3 1 2 3 1 2 3 ∣ ∣ = ∣ ∣ 1 0 0 1 0 0 1 0 0 ∣ ∣ = 0
If a has a row of 0’s, then det ( A ) = 0 \text{det}\left( A \right) = 0 det ( A ) = 0 (∣ 0 0 c d ∣ = 0 d − 0 c = 0 \begin{vmatrix} 0 & 0 \\ c & d \end{vmatrix} = 0d - 0c = 0 ∣ ∣ 0 c 0 d ∣ ∣ = 0 d − 0 c = 0 )
Note: At this point, we can calculate any determinant. Moreover, we see that det ( A ) ≠ 0 \text{det}\left( A \right) \neq 0 det ( A ) = 0 if and only if A A A is invertible.
Perform row operations to find rref ( A ) \text{rref}\left( A \right) rref ( A )
rref ( A ) = I n \text{rref}\left( A \right) = I_{n} rref ( A ) = I n if and only if A A A is invertible
det ( A ) = det ( A T ) \text{det}\left( A \right) = \text{det}\left( A^{T} \right) det ( A ) = det ( A T ) (∣ a b c d ∣ = a d − b c = ∣ a c b d ∣ = a d − c d \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc = \begin{vmatrix} a & c \\ b & d \end{vmatrix} = ad - cd ∣ ∣ a c b d ∣ ∣ = a d − b c = ∣ ∣ a b c d ∣ ∣ = a d − c d )
Example
∣ 1 0 0 5 0 1 0 3 0 0 1 2 0 0 0 10 ∣ = ∣ 1 0 0 0 0 1 0 0 0 0 1 0 5 3 2 10 ∣ = ∣ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 10 ∣ = 10 ∣ I 4 ∣ = 10 \begin{vmatrix} 1 & 0 & 0 & 5 \\ 0 & 1 & 0 & 3 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 10 \end{vmatrix} = \begin{vmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 5 & 3 & 2 & 10 \end{vmatrix} = \begin{vmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 10 \end{vmatrix} = 10 \mid I_{4} \mid = 10 ∣ ∣ 1 0 0 0 0 1 0 0 0 0 1 0 5 3 2 10 ∣ ∣ = ∣ ∣ 1 0 0 5 0 1 0 3 0 0 1 2 0 0 0 10 ∣ ∣ = ∣ ∣ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 10 ∣ ∣ = 10 ∣ I 4 ∣= 10
The difference between det ( A ) \text{det}\left( A \right) det ( A ) and det ( rref ( A ) ) \text{det}\left( \text{rref}\left( A \right) \right) det ( rref ( A ) ) is always a nonzero multiplier.
det ( rref ( A ) ) { 0 if row of 0’s 1 ifrref ( A ) = I n \text{det}\left( \text{rref}\left( A \right) \right) \begin{cases} 0 & \text{if row of 0’s} \\ 1 & \text{if} \text{rref} \left( A \right) = I_{n} \end{cases} det ( rref ( A ) ) { 0 1 if row of 0’s if rref ( A ) = I n
Exercise :
∣ 1 0 0 0 0 3 0 0 0 0 − 1 0 0 0 0 5 ∣ = − 15 ∣ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ∣ = − 15 \begin{vmatrix} 1 & 0 & 0 & 0 \\ 0 & 3 & 0 & 0 \\ 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & 5 \end{vmatrix} = -15 \begin{vmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{vmatrix} = -15 ∣ ∣ 1 0 0 0 0 3 0 0 0 0 − 1 0 0 0 0 5 ∣ ∣ = − 15 ∣ ∣ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ∣ ∣ = − 15
A = ∣ 1 0 0 0 2 3 0 0 0 1 − 1 0 7 3 1 5 ∣ = − 15 A = \begin{vmatrix} 1 & 0 & 0 & 0 \\ 2 & 3 & 0 & 0 \\ 0 & 1 & -1 & 0 \\ 7 & 3 & 1 & 5 \end{vmatrix} = -15 A = ∣ ∣ 1 2 0 7 0 3 1 3 0 0 − 1 1 0 0 0 5 ∣ ∣ = − 15
How to compute using cofactors (The book has other methods):
Definition:
For an n × n n\times n n × n matrix A A A ,
A i j A_{ij} A ij is ( n − 1 ) × ( n − 1 ) (n-1)\times (n-1) ( n − 1 ) × ( n − 1 ) matrix obtained by removing row i and column j from matrix A A A .
The determinant ∣ A i j ∣ \mid A_{ij} \mid ∣ A ij ∣ is called the minor of A A A .
Example
A 23 = [ 1 0 0 0 1 0 7 3 5 ] A_{23} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 7 & 3 & 5 \end{bmatrix} A 23 = ⎣ ⎡ 1 0 7 0 1 3 0 0 5 ⎦ ⎤
Cofactor expansion for calculating det ( A ) \text{det}\left( A \right) det ( A )
det ( A ) = a 11 det ( A 11 ) − a 12 det ( A 12 ) + ⋯ + a 1 n ( − 1 ) n + 1 det ( A 1 n ) \text{det}\left( A \right) = a_{11}\text{det}\left( A_{11} \right) - a_{12}\text{det}\left( A_{12} \right) + \cdots + a_{1n}\left( -1 \right) ^{n+1} \text{det}\left( A_{1n} \right) det ( A ) = a 11 det ( A 11 ) − a 12 det ( A 12 ) + ⋯ + a 1 n ( − 1 ) n + 1 det ( A 1 n )
= a 11 c 11 + a 12 c 12 + a 13 c 13 + ⋯ + a 1 n c 1 n = a_{11}c_{11} + a_{12}c_{12} + a_{13}c_{13} + \cdots + a_{1n}c_{1n} = a 11 c 11 + a 12 c 12 + a 13 c 13 + ⋯ + a 1 n c 1 n
Where C i j = ( − 1 ) i + j ∣ A i j ∣ C_{ij} = \left( -1 \right) ^{i+j} \mid A_{ij} \mid C ij = ( − 1 ) i + j ∣ A ij ∣ is called a cofactor.
For 3 × 3 3\times 3 3 × 3 matrix:
∣ a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 ∣ = a 11 ∣ a 22 a 23 a 32 a 33 ∣ − a 12 ∣ a 21 a 23 a 31 a 33 ∣ + a 13 ∣ a 21 a 22 a 31 a 32 ∣ \begin{vmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix} = a_{11} \begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{vmatrix} - a_{12} \begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix} + a_{13} \begin{vmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{vmatrix} ∣ ∣ a 11 a 21 a 31 a 12 a 22 a 32 a 13 a 23 a 33 ∣ ∣ = a 11 ∣ ∣ a 22 a 32 a 23 a 33 ∣ ∣ − a 12 ∣ ∣ a 21 a 31 a 23 a 33 ∣ ∣ + a 13 ∣ ∣ a 21 a 31 a 22 a 32 ∣ ∣
Or another expansion:
∣ a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 ∣ = − a 12 ∣ a 21 a 23 a 31 a 33 ∣ + a 22 ∣ a 11 a 13 a 31 a 33 ∣ − a 32 ∣ a 11 a 13 a 21 a 23 ∣ \begin{vmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix} = -a_{12} \begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix} + a_{22} \begin{vmatrix} a_{11} & a_{13} \\ a_{31} & a_{33} \end{vmatrix} - a_{32} \begin{vmatrix} a_{11} & a_{13} \\ a_{21} & a_{23} \end{vmatrix} ∣ ∣ a 11 a 21 a 31 a 12 a 22 a 32 a 13 a 23 a 33 ∣ ∣ = − a 12 ∣ ∣ a 21 a 31 a 23 a 33 ∣ ∣ + a 22 ∣ ∣ a 11 a 31 a 13 a 33 ∣ ∣ − a 32 ∣ ∣ a 11 a 21 a 13 a 23 ∣ ∣
Example
∣ 1 2 0 4 1 0 ∣ = 1 ∣ 1 0 − 1 3 ∣ − 2 ∣ 4 0 1 3 ∣ + 0 ∣ 4 1 1 − 1 ∣ \begin{vmatrix} 1 & 2 & 0 \\ 4 & 1 & 0 \end{vmatrix} = 1 \begin{vmatrix} 1 & 0 \\ -1 & 3 \end{vmatrix} - 2 \begin{vmatrix} 4 & 0\\ 1 & 3 \end{vmatrix} + 0 \begin{vmatrix} 4 & 1 \\ 1 & -1 \end{vmatrix} ∣ ∣ 1 4 2 1 0 0 ∣ ∣ = 1 ∣ ∣ 1 − 1 0 3 ∣ ∣ − 2 ∣ ∣ 4 1 0 3 ∣ ∣ + 0 ∣ ∣ 4 1 1 − 1 ∣ ∣
= 1 ( 3 − 0 ) − 2 ( 12 − 0 ) = − 21 = 1 (3-0) - 2 (12-0) = -21 = 1 ( 3 − 0 ) − 2 ( 12 − 0 ) = − 21
Example
∣ 0 0 0 2 1 0 0 3 0 1 0 2 0 0 1 3 ∣ = ( − 1 ) 1 + 4 2 ∣ 1 0 0 0 1 0 0 0 1 ∣ = − 2 \begin{vmatrix} 0 & 0 & 0 & 2 \\ 1 & 0 & 0 & 3 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & 3 \end{vmatrix} = (-1)^{1+4} 2 \begin{vmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{vmatrix} = -2 ∣ ∣ 0 1 0 0 0 0 1 0 0 0 0 1 2 3 2 3 ∣ ∣ = ( − 1 ) 1 + 4 2 ∣ ∣ 1 0 0 0 1 0 0 0 1 ∣ ∣ = − 2
Example
∣ 5 4 3 0 − 1 2 0 0 6 ∣ = 5 ∣ − 1 2 0 6 ∣ + 0 + 0 = 5 ( − 1 ) ( 6 ) = − 30 \begin{vmatrix} 5 & 4 & 3 \\ 0 & -1 & 2 \\ 0 & 0 & 6 \end{vmatrix} = 5 \begin{vmatrix} -1 & 2 \\ 0 & 6 \end{vmatrix} + 0 + 0 = 5(-1)(6) = -30 ∣ ∣ 5 0 0 4 − 1 0 3 2 6 ∣ ∣ = 5 ∣ ∣ − 1 0 2 6 ∣ ∣ + 0 + 0 = 5 ( − 1 ) ( 6 ) = − 30
If A A A is upper triangular (or lower triangular), det ( A ) \text{det}\left( A \right) det ( A ) is product of diagonal entries.
Example
For which values of k k k is the matrix [ 0 k 1 2 3 4 5 6 7 ] \begin{bmatrix} 0 & k & 1 \\ 2 & 3 & 4 \\ 5 & 6 & 7 \end{bmatrix} ⎣ ⎡ 0 2 5 k 3 6 1 4 7 ⎦ ⎤ invertible?
∣ 0 k 1 2 3 4 5 6 7 ∣ = − k ∣ 2 4 5 7 ∣ + 1 ∣ 2 3 5 6 ∣ \begin{vmatrix} 0 & k & 1 \\ 2 & 3 & 4 \\ 5 & 6 & 7 \end{vmatrix} = -k \begin{vmatrix} 2 & 4 \\ 5 & 7 \end{vmatrix} + 1 \begin{vmatrix} 2 & 3 \\ 5 & 6 \end{vmatrix} ∣ ∣ 0 2 5 k 3 6 1 4 7 ∣ ∣ = − k ∣ ∣ 2 5 4 7 ∣ ∣ + 1 ∣ ∣ 2 5 3 6 ∣ ∣
= − k ( 14 − 20 ) + 1 ( 12 − 15 ) = -k (14-20) + 1(12-15) = − k ( 14 − 20 ) + 1 ( 12 − 15 )
= 6 k − 3 = 6k-3 = 6 k − 3
Need: 6 k − 3 ≠ 0 6k-3 \neq 0 6 k − 3 = 0
∴ k ≠ 1 2 \therefore k\neq \frac{1}{2} ∴ k = 2 1
Exercise : For which values of λ \lambda λ is the matrix A − λ I A - \lambda I A − λ I not invertible where A = [ 4 2 2 7 ] A = \begin{bmatrix} 4 & 2 \\ 2 & 7 \end{bmatrix} A = [ 4 2 2 7 ] ?
A − λ I = [ 4 − λ 2 2 7 − λ ] A - \lambda I = \begin{bmatrix} 4-\lambda & 2 \\ 2 & 7-\lambda \end{bmatrix} A − λ I = [ 4 − λ 2 2 7 − λ ]
Want λ \lambda λ so that det ( A − λ I ) = 0 \text{det}\left( A-\lambda I \right) = 0 det ( A − λ I ) = 0
∣ 4 − λ 2 2 7 − λ ∣ = ( 4 − λ ) ( 7 − λ ) − 4 = 28 − 11 λ + λ 2 − 4 \begin{vmatrix} 4-\lambda & 2 \\ 2 & 7 - \lambda \end{vmatrix} = (4-\lambda) (7-\lambda) -4 = 28 - 11\lambda + \lambda ^2 - 4 ∣ ∣ 4 − λ 2 2 7 − λ ∣ ∣ = ( 4 − λ ) ( 7 − λ ) − 4 = 28 − 11 λ + λ 2 − 4
= λ 2 − 11 λ + 24 = ( λ − 8 ) ( λ − 3 ) = \lambda ^{2} - 11\lambda + 24 = (\lambda - 8) (\lambda - 3) = λ 2 − 11 λ + 24 = ( λ − 8 ) ( λ − 3 )
det ( A − λ I ) = 0 \text{det}(A-\lambda I) = 0 det ( A − λ I ) = 0 if and only if λ = 8 \lambda = 8 λ = 8 or λ = 3 \lambda = 3 λ = 3
Example
Let A = [ 4 3 2 1 0 x 7 2 0 2 3 4 4 3 5 1 ] A = \begin{bmatrix} 4 & 3 & 2 & 1 \\ 0 & x & 7 & 2 \\ 0 & 2 & 3 & 4 \\4 & 3 & 5 & 1 \end{bmatrix} A = ⎣ ⎡ 4 0 0 4 3 x 2 3 2 7 3 5 1 2 4 1 ⎦ ⎤
Compute the determinant of A A A
det ( A ) = ∣ 4 3 2 1 0 x 7 2 0 2 3 4 0 0 3 0 ∣ = 4 ∣ x 7 2 2 3 4 0 3 0 ∣ = − 4 ( 3 ) ∣ x 2 2 4 ∣ \text{det}\left( A \right) = \begin{vmatrix} 4 & 3 & 2 & 1 \\ 0 & x & 7 & 2 \\ 0 & 2 & 3 & 4 \\ 0 & 0 & 3 & 0 \end{vmatrix} = 4 \begin{vmatrix} x & 7 & 2 \\ 2 & 3 & 4 \\ 0 & 3 & 0 \end{vmatrix} = -4 (3) \begin{vmatrix} x & 2 \\ 2 & 4 \end{vmatrix} det ( A ) = ∣ ∣ 4 0 0 0 3 x 2 0 2 7 3 3 1 2 4 0 ∣ ∣ = 4 ∣ ∣ x 2 0 7 3 3 2 4 0 ∣ ∣ = − 4 ( 3 ) ∣ ∣ x 2 2 4 ∣ ∣
= − 12 ( 4 x − 4 ) = − 48 x + 48 = -12 (4x -4) = -48x + 48 = − 12 ( 4 x − 4 ) = − 48 x + 48
For which value of x x x is the matrix A A A not invertible?
x = 1 x=1 x = 1
This is when det ( A ) = 0 \text{det}\left( A \right) = 0 det ( A ) = 0 or − 48 x + 48 = 0 -48x + 48 = 0 − 48 x + 48 = 0
Properties of Determinants:
For an n × n n\times n n × n matrix A A A , the determinant of A A A , ∣ A ∣ \mid A \mid ∣ A ∣ or det ( A ) \text{det}\left( A \right) det ( A ) , is a number satisfying:
∣ I n ∣ = 1 \mid I_{n} \mid = 1 ∣ I n ∣= 1
Determinant changes sign when 2 rows in matrix are exchanged
Determinant is linear in each row separately (called multi linear).
If 2 rows of A A A are equal, then det ( A ) = 0 \text{det}\left( A \right) =0 det ( A ) = 0
Adding a multiple of one row to another tow does not change the determinant.
If A A A has a row of zeros, then det ( A ) = 0 \text{det}\left( A \right) = 0 det ( A ) = 0
For any n × n n\times n n × n matrix A A A , det ( A ) = det ( A T ) \text{det}\left( A \right) = \text{det}\left( A^{T} \right) det ( A ) = det ( A T ) .
If A A A is upper triangular (or lower triangular), then det ( A ) \text{det}\left( A \right) det ( A ) is the product of the diagonal entries
If A A A and B B B are n × n n\times n n × n matrices, then det ( A B ) = det ( A ) det ( B ) \text{det}\left( AB \right) = \text{det}\left( A \right) \text{det}(B) det ( A B ) = det ( A ) det ( B )
Recall that det ( A ) ≠ 0 \text{det}\left( A \right) \neq 0 det ( A ) = 0 if and only if A A A is invertible.
Illustrating Property #9 for 2 × 2 2\times 2 2 × 2 matrices
A = [ a b c d ] A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} A = [ a c b d ]
B = [ x y z w ] B = \begin{bmatrix} x & y \\ z & w \end{bmatrix} B = [ x z y w ]
A ⋅ B = [ a x + b z a y + b w c x + d z c y + d w ] A\cdot B = \begin{bmatrix} ax+bzay + bw \\ cx + dzcy + dw \end{bmatrix} A ⋅ B = [ a x + b z a y + b w c x + d zcy + d w ]
det ( A ) ⋅ det ( B ) = ( a d − b c ) ( w x − y z ) \text{det}\left( A \right) \cdot \text{det}\left( B \right) = (ad-bc) (wx-yz) det ( A ) ⋅ det ( B ) = ( a d − b c ) ( w x − yz )
det ( A ⋅ B ) = a d w x − a d y z − b c w x + b c y z \text{det}\left( A\cdot B \right) = adwx-adyz-bcwx+bcyz det ( A ⋅ B ) = a d w x − a d yz − b c w x + b cyz
det ( A B ) = det ( A ) det ( B ) \text{det}\left( AB \right) = \text{det}\left( A \right) \text{det}\left( B \right) det ( A B ) = det ( A ) det ( B )
Example
A = [ 1 4 7 0 2 2 0 0 4 ] A = \begin{bmatrix} 1 & 4 & 7 \\ 0 & 2 & 2 \\ 0 & 0 & 4 \end{bmatrix} A = ⎣ ⎡ 1 0 0 4 2 0 7 2 4 ⎦ ⎤
Find ∣ A ∣ = 1 ( 2 ) ( 4 ) = 8 \mid A \mid = 1 (2)(4) = 8 ∣ A ∣= 1 ( 2 ) ( 4 ) = 8
Find ∣ A 3 ∣ = ∣ A A A ∣ = ∣ A ∣ ∣ A ∣ ∣ A ∣ = 8 3 \mid A^{3} \mid = \mid AAA \mid = \mid A \mid \mid A \mid \mid A \mid = 8^{3} ∣ A 3 ∣=∣ AAA ∣=∣ A ∣∣ A ∣∣ A ∣= 8 3
Find ∣ A − 1 ∣ = 1 8 \mid A^{-1} \mid = \frac{1}{8} ∣ A − 1 ∣= 8 1
Example
Suppose M M M and N N N are 3 × 3 3\times 3 3 × 3 matrices with det ( M ) = 4 \text{det}\left( M \right) = 4 det ( M ) = 4 and det ( N ) = − 1 \text{det}\left( N \right) = -1 det ( N ) = − 1 . Find the determinant of the matrix 2 M − 1 N 2 M T 2M^{-1}N^{2}M^{T} 2 M − 1 N 2 M T .
2 3 1 det ( M ) ( det ( N ) ) 2 det ( M ) = 2 3 1 4 ( − 1 ) 2 ⋅ 4 = 8 2^{3}\frac{1}{\text{det}\left( M \right) } \left( \text{det}\left( N \right) \right) ^{2} \text{det}\left( M \right) = 2^{3}\frac{1}{4} (-1)^{2} \cdot 4 = 8 2 3 det ( M ) 1 ( det ( N ) ) 2 det ( M ) = 2 3 4 1 ( − 1 ) 2 ⋅ 4 = 8
Example
Suppose v ⃗ 1 \vec{v}_1 v 1 , v ⃗ 2 \vec{v}_2 v 2 , and v ⃗ 3 \vec{v}_3 v 3 are row vectors in R 3 \mathbb{R}^{3} R 3 and A = [ − v ⃗ 1 − − v ⃗ 2 − − v ⃗ 3 − ] A = \begin{bmatrix} - & \vec{v}_1 & - \\ - & \vec{v}_2 & - \\ - & \vec{v}_3 & - \end{bmatrix} A = ⎣ ⎡ − − − v 1 v 2 v 3 − − − ⎦ ⎤ satisfies det ( A ) = 5 \text{det}\left( A \right) = 5 det ( A ) = 5 .
det ( 3 A ) = 3 3 5 \text{det}\left( 3A \right) = 3^{3}5 det ( 3 A ) = 3 3 5
det ( − A ) = ( − 1 ) 3 5 = − 5 \text{det}\left( -A \right) = (-1)^{3}5 = -5 det ( − A ) = ( − 1 ) 3 5 = − 5
∣ 0 0 4 0 ∣ ∣ 1 ∣ v ⃗ 1 ⊥ v ⃗ 2 ⊥ 3 v ⃗ 3 ⊥ ∣ ∣ 0 ∣ ∣ = ( − 1 ) 1 + 3 4 det ( A T ) = 4 ( 5 ) = 20 \begin{vmatrix} 0 & 0 & 4 & 0 \\ | & | & 1 & | \\ \vec{v}_1^{\bot} & \vec{v}_2 ^{\bot} & 3 & \vec{v}_3^{\bot} \\ | & | & 0 & | \end{vmatrix} = (-1)^{1+3}4 \text{det} \left( A^{T} \right) = 4(5)=20 ∣ ∣ 0 ∣ v 1 ⊥ ∣ 0 ∣ v 2 ⊥ ∣ 4 1 3 0 0 ∣ v 3 ⊥ ∣ ∣ ∣ = ( − 1 ) 1 + 3 4 det ( A T ) = 4 ( 5 ) = 20
Suppose A A A is an orthogonal matrix. What can det ( A ) \text{det}\left( A \right) det ( A ) be?
Know: A A A is invertible. det ( A ) ≠ 0 \text{det}\left( A \right) \neq 0 det ( A ) = 0
Use: A T A = I n ⟹ det ( A T ) det ( A ) = 1 A^{T}A = I_{n} \implies \text{det}\left( A^{T} \right) \text{det}\left( A \right) =1 A T A = I n ⟹ det ( A T ) det ( A ) = 1
Property: det ( A T ) = det ( A ) ⟹ ( det ( A ) ) 2 = 1 \text{det}\left( A^{T} \right) = \text{det}\left( A \right) \implies \left( \text{det}\left( A \right) \right) ^{2}=1 det ( A T ) = det ( A ) ⟹ ( det ( A ) ) 2 = 1
Answer: det ( A ) = 1 \text{det}\left( A \right) = 1 det ( A ) = 1 or det ( A ) = − 1 \text{det}\left( A \right) = -1 det ( A ) = − 1
7.1 Diagonalization 7.1 Diagonalization
Suppose D = [ d 1 0 ⋯ 0 0 d 2 ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ d n ] D = \begin{bmatrix} d_1 & 0 & \cdots & 0 \\ 0 & d_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & d_n \end{bmatrix} D = ⎣ ⎡ d 1 0 ⋮ 0 0 d 2 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ d n ⎦ ⎤ is a n × n n\times n n × n diagonal matrix. Then,
For k k k positive integer, D k = [ d 1 k 0 ⋯ 0 0 d 2 k ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ d n k ] D^{k} = \begin{bmatrix} d_1^{k} & 0 & \cdots & 0 \\ 0 & d_2^{k} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & d_n^{k} \end{bmatrix} D k = ⎣ ⎡ d 1 k 0 ⋮ 0 0 d 2 k ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ d n k ⎦ ⎤
det ( D ) = d 1 d 2 d 3 ⋯ d n \text{det}\left( D \right) = d_1d_2d_3 \cdots d_n det ( D ) = d 1 d 2 d 3 ⋯ d n
D − 1 = [ 1 d 1 0 ⋯ 0 0 1 d 2 ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ 1 d n ] D^{-1} = \begin{bmatrix} \frac{1}{d_1} & 0 & \cdots & 0 \\ 0 & \frac{1}{d_2} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \frac{1}{d_n} \end{bmatrix} D − 1 = ⎣ ⎡ d 1 1 0 ⋮ 0 0 d 2 1 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ d n 1 ⎦ ⎤ (if d 1 , d 2 , d 3 , ⋯ , d n ≠ 0 d_1, d_2, d_3, \cdots , d_n \neq 0 d 1 , d 2 , d 3 , ⋯ , d n = 0 )
Definition:
A square matrix A A A is diagonalizable provided there exists an invertible matrix S S S and diagonal matrix B B B such that S − 1 A S = B S^{-1}AS = B S − 1 A S = B .
When we diagonalize a matrix A A A , we find an invertible matrix S S S and a diagonal matrix B B B such that S − 1 A S = B S^{-1}AS = B S − 1 A S = B .
Notice : S − 1 A S = B ↔ A S = S B ↔ A = S B S − 1 S^{-1}AS = B \leftrightarrow AS = SB \leftrightarrow A = SBS^{-1} S − 1 A S = B ↔ A S = SB ↔ A = SB S − 1
det ( A ) = det ( S B S − 1 ) = det ( A ) det ( B ) det ( S − 1 ) = det ( B ) \text{det}\left( A \right) = \text{det}\left( SBS^{-1} \right) = \text{det}\left( A \right) \text{det}\left( B \right) \text{det}\left( S^{-1} \right) = \text{det}\left( B \right) det ( A ) = det ( SB S − 1 ) = det ( A ) det ( B ) det ( S − 1 ) = det ( B )
A k = ( S B S − 1 ) ( S B S − 1 ) ( S B S − 1 ) ⋯ ( S B S − 1 ) = S B k S − 1 A^{k} = (SBS^{-1}) (SBS^{-1}) (SBS^{-1}) \cdots (SBS^{-1}) = SB^{k}S^{-1} A k = ( SB S − 1 ) ( SB S − 1 ) ( SB S − 1 ) ⋯ ( SB S − 1 ) = S B k S − 1
A A A is invertible if and only if B B B is invertible. A − 1 = S B − 1 S − 1 A^{-1} = SB^{-1}S^{-1} A − 1 = S B − 1 S − 1
Check: A ( S B − 1 S − 1 ) = S B S 1 ( S B − 1 S − 1 ) = I n A(SB^{-1}S^{-1}) = SBS^{1}(SB^{-1}S^{-1}) = I_{n} A ( S B − 1 S − 1 ) = SB S 1 ( S B − 1 S − 1 ) = I n
Example
Let A = [ 5 1 1 5 ] A = \begin{bmatrix} 5 & 1 \\ 1 & 5 \end{bmatrix} A = [ 5 1 1 5 ] . A A A is diagonalizable with S = [ 1 − 1 1 1 ] S = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix} S = [ 1 1 − 1 1 ] and B = [ 6 0 0 4 ] B = \begin{bmatrix} 6 & 0 \\ 0 & 4 \end{bmatrix} B = [ 6 0 0 4 ] .
Check
S − 1 = 1 2 [ 1 1 − 1 1 ] S^{-1} = \frac{1}{2}\begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} S − 1 = 2 1 [ 1 − 1 1 1 ]
B S − 1 = [ 6 0 0 4 ] [ 1 2 1 2 − 1 2 1 2 ] = [ 3 3 − 2 2 ] BS^{-1} = \begin{bmatrix} 6 & 0 \\ 0 & 4 \end{bmatrix} \begin{bmatrix} \frac{1}{2} & \frac{1}{2} \\ -\frac{1}{2} & \frac{1}{2} \end{bmatrix} = \begin{bmatrix} 3 & 3 \\ -2 & 2 \end{bmatrix} B S − 1 = [ 6 0 0 4 ] [ 2 1 − 2 1 2 1 2 1 ] = [ 3 − 2 3 2 ]
S B S − 1 = [ 1 − 1 1 1 ] [ 3 3 − 2 2 ] = [ 5 1 1 5 ] SBS^{-1} = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix} \begin{bmatrix} 3 & 3 \\ -2 & 2 \end{bmatrix} = \begin{bmatrix} 5 & 1 \\ 1 & 5 \end{bmatrix} SB S − 1 = [ 1 1 − 1 1 ] [ 3 − 2 3 2 ] = [ 5 1 1 5 ]
Question: What does diagonalizable mean?
Suppose B = [ λ 1 0 ⋯ 0 0 λ 2 ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ λ n ] B = \begin{bmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_n \end{bmatrix} B = ⎣ ⎡ λ 1 0 ⋮ 0 0 λ 2 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ λ n ⎦ ⎤ , S = [ ∣ ∣ ∣ v ⃗ 1 v ⃗ 2 ⋯ v ⃗ 3 ∣ ∣ ∣ ] S = \begin{bmatrix} | & | & & | \\ \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_3 \\ | & | & & | \end{bmatrix} S = ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v 3 ∣ ⎦ ⎤ , and S − 1 A S = B S^{-1}AS = B S − 1 A S = B . Then,
A S = A [ ∣ ∣ ∣ v ⃗ 1 v ⃗ 2 ⋯ v ⃗ n ∣ ∣ ∣ ] = [ ∣ ∣ ∣ A v ⃗ 1 A v ⃗ 2 ⋯ A v ⃗ n ∣ ∣ ∣ ] AS = A \begin{bmatrix} | & | & & | \\ \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_n \\ | & | & & | \end{bmatrix} = \begin{bmatrix} | & | & & | \\ A\vec{v}_1 & A\vec{v}_2 & \cdots & A\vec{v}_n \\ | & | & & | \end{bmatrix} A S = A ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v n ∣ ⎦ ⎤ = ⎣ ⎡ ∣ A v 1 ∣ ∣ A v 2 ∣ ⋯ ∣ A v n ∣ ⎦ ⎤
S B = [ ∣ ∣ ∣ v ⃗ 1 v ⃗ 2 ⋯ v ⃗ n ∣ ∣ ∣ ] [ λ 1 0 ⋯ 0 0 λ 2 ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ λ n ] = [ ∣ ∣ ∣ λ 1 v ⃗ 1 λ 2 v ⃗ 2 ⋯ λ n v ⃗ n ∣ ∣ ∣ ] SB = \begin{bmatrix} | & | & & | \\ \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_n \\ | & | & & | \end{bmatrix} \begin{bmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_n \end{bmatrix} = \begin{bmatrix} | & | & & | \\ \lambda_1 \vec{v}_1 & \lambda_2 \vec{v}_2 & \cdots & \lambda_n \vec{v}_n \\ | & | & & | \end{bmatrix} SB = ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v n ∣ ⎦ ⎤ ⎣ ⎡ λ 1 0 ⋮ 0 0 λ 2 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ λ n ⎦ ⎤ = ⎣ ⎡ ∣ λ 1 v 1 ∣ ∣ λ 2 v 2 ∣ ⋯ ∣ λ n v n ∣ ⎦ ⎤
Notice: A S = S B AS = SB A S = SB if and only if A v ⃗ i = λ i v ⃗ i A\vec{v}_i = \lambda_i \vec{v}_i A v i = λ i v i for 1 ≤ i ≤ n 1\le i \le n 1 ≤ i ≤ n .
Note: S S S invertible. Columns of S S S are independent and form a basis for R n \mathbb{R}^{n} R n .
Answer: An n × n n\times n n × n matrix A A A is diagonalizable if and only if there exists a basis { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ n } \{ \vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_n \} { v 1 , v 2 , ⋯ , v n } for R n \mathbb{R}^{n} R n and scalars λ 1 , λ 2 , ⋯ , λ n \lambda_1 , \lambda_2 , \cdots , \lambda_n λ 1 , λ 2 , ⋯ , λ n with A v ⃗ i = λ i v ⃗ i A\vec{v}_i = \lambda_i \vec{v}_i A v i = λ i v i for i = 1 , 2 , ⋯ , n i=1,2,\cdots , n i = 1 , 2 , ⋯ , n .
In our example : A = [ 5 1 1 5 ] A = \begin{bmatrix} 5 & 1 \\ 1 & 5 \end{bmatrix} A = [ 5 1 1 5 ] . We had S = [ 1 − 1 1 1 ] S = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix} S = [ 1 1 − 1 1 ] and B = [ 6 0 0 4 ] B = \begin{bmatrix} 6 & 0 \\ 0 & 4 \end{bmatrix} B = [ 6 0 0 4 ] .
Basis for R 2 \mathbb{R}^{2} R 2 : { [ 1 1 ] , [ − 1 1 ] } \{ \begin{bmatrix} 1 \\ 1 \end{bmatrix} , \begin{bmatrix} -1 \\ 1 \end{bmatrix} \} { [ 1 1 ] , [ − 1 1 ] }
A [ 1 1 ] = [ 5 1 1 5 ] [ 1 1 ] = [ 6 6 ] = 6 [ 1 1 ] A \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 5 & 1 \\ 1 & 5 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 6 \\ 6 \end{bmatrix} = 6 \begin{bmatrix} 1 \\ 1 \end{bmatrix} A [ 1 1 ] = [ 5 1 1 5 ] [ 1 1 ] = [ 6 6 ] = 6 [ 1 1 ]
A [ − 1 1 ] = [ 5 1 1 5 ] [ − 1 1 ] = [ − 4 4 ] = 4 [ − 1 1 ] A \begin{bmatrix} -1 \\ 1 \end{bmatrix} = \begin{bmatrix} 5 & 1 \\ 1 & 5 \end{bmatrix} \begin{bmatrix} -1 \\ 1 \end{bmatrix} = \begin{bmatrix} -4 \\ 4 \end{bmatrix} = 4 \begin{bmatrix} -1 \\ 1 \end{bmatrix} A [ − 1 1 ] = [ 5 1 1 5 ] [ − 1 1 ] = [ − 4 4 ] = 4 [ − 1 1 ]
Definition:
A nonzero vector v ⃗ \vec{v} v in R n \mathbb{R}^{n} R n is an eigenvector of A A A with eigenvalue λ \lambda λ provided A v ⃗ = λ v ⃗ A \vec{v} = \lambda \vec{v} A v = λ v . Note, A v ⃗ A\vec{v} A v is parallel to v ⃗ \vec{v} v
A basis { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ n } \{ \vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_n \} { v 1 , v 2 , ⋯ , v n } for R n \mathbb{R}^{n} R n is called an eigenbasis for A A A provided there exists scalars λ 1 , ⋯ , λ n \lambda_1 , \cdots , \lambda_n λ 1 , ⋯ , λ n with A v ⃗ 1 = λ i v ⃗ i A\vec{v}_1 = \lambda_i \vec{v}_i A v 1 = λ i v i for 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n .
Note : With this language, an n × n n\times n n × n matrix A A A is diagonalizable if and only if A A A has an eigenbasis. (There exists a basis for R n \mathbb{R}^{n} R n of eigenvectors for A A A ).
Example
Find all 2 × 2 2\times 2 2 × 2 matrices for which [ 1 1 ] \begin{bmatrix} 1 \\ 1 \end{bmatrix} [ 1 1 ] is an eigenvector with eigenvalue λ = 6 \lambda = 6 λ = 6 .
Want: [ a b c d ] [ 1 1 ] = 6 [ 1 1 ] \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = 6 \begin{bmatrix} 1 \\ 1 \end{bmatrix} [ a c b d ] [ 1 1 ] = 6 [ 1 1 ] . Note [ 5 1 1 5 ] \begin{bmatrix} 5 & 1 \\ 1 & 5 \end{bmatrix} [ 5 1 1 5 ] is of this type.
[ a b c d ] [ 1 1 ] = [ a + b c + d ] \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} a+b \\ c+d \end{bmatrix} [ a c b d ] [ 1 1 ] = [ a + b c + d ]
a + b = 6 ⟹ b = 6 − a a+b = 6 \implies b = 6-a a + b = 6 ⟹ b = 6 − a
c + d = 6 ⟹ d = 6 − c c+d = 6 \implies d=6-c c + d = 6 ⟹ d = 6 − c
[ a 6 − a c 6 − c ] a , c ∈ R \begin{bmatrix} a & 6-a \\ c & 6-c \end{bmatrix} a,c \in \mathbb{R} [ a c 6 − a 6 − c ] a , c ∈ R
Example
Suppose A A A is the 2 × 2 2\times 2 2 × 2 matrix of reflection about line y = 2 x y=2x y = 2 x . Is A A A diagonalizable? If so, diagonalize A A A .
Yes!
$L = \text{span} |{ \begin{bmatrix} 1 \\ 2 \end{bmatrix} \}$
$\text{ref}{L}\left( \vec{x} \right) = 2 \text{proj} {L}\left( \vec{x} \right) - \vec{x}$
Matrix: 2 ⋅ 1 1 + 4 [ 1 2 2 4 ] − [ 1 0 0 1 ] = [ − 3 5 4 5 4 5 3 5 ] 2 \cdot \frac{1}{1+4} \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix} - \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} -\frac{3}{5} & \frac{4}{5} \\ \frac{4}{5} & \frac{3}{5} \end{bmatrix} 2 ⋅ 1 + 4 1 [ 1 2 2 4 ] − [ 1 0 0 1 ] = [ − 5 3 5 4 5 4 5 3 ]
ref L [ 1 2 ] = [ 1 2 ] \text{ref}_{L} \begin{bmatrix} 1\\ 2 \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \end{bmatrix} ref L [ 1 2 ] = [ 1 2 ] (λ = 1 \lambda = 1 λ = 1 )
ref L [ 2 − 1 ] = − [ 2 − 1 ] \text{ref}_{L} \begin{bmatrix} 2 \\ -1 \end{bmatrix} = - \begin{bmatrix} 2 \\ -1 \end{bmatrix} ref L [ 2 − 1 ] = − [ 2 − 1 ] (λ = − 1 \lambda = -1 λ = − 1 )
S = [ 1 2 2 1 ] S = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix} S = [ 1 2 2 1 ]
B = [ 1 0 0 − 1 ] B = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} B = [ 1 0 0 − 1 ]
Check: A S = S B = [ 1 − 2 2 1 ] AS = SB = \begin{bmatrix} 1 & -2 \\ 2 & 1 \end{bmatrix} A S = SB = [ 1 2 − 2 1 ]
Example
Suppose A A A is the 2 × 2 2\times 2 2 × 2 matrix of projection onto the line L = span { [ − 1 7 ] } L = \text{span}\{ \begin{bmatrix} -1 \\ 7 \end{bmatrix} \} L = span { [ − 1 7 ] } . Diagonalize A A A if you can.
proj L [ − 1 7 ] = 1 [ − 1 7 ] \text{proj}_{L} \begin{bmatrix} -1 \\ 7 \end{bmatrix} = 1 \begin{bmatrix} -1 \\ 7 \end{bmatrix} proj L [ − 1 7 ] = 1 [ − 1 7 ] (λ = 1 \lambda = 1 λ = 1 )
proj L [ 7 1 ] = 0 [ 7 1 ] \text{proj}_{L} \begin{bmatrix} 7 \\ 1 \end{bmatrix} = 0 \begin{bmatrix} 7 \\ 1 \end{bmatrix} proj L [ 7 1 ] = 0 [ 7 1 ] (λ = 0 \lambda = 0 λ = 0 )
S = [ − 1 7 7 1 ] S = \begin{bmatrix} -1 & 7 \\ 7 & 1 \end{bmatrix} S = [ − 1 7 7 1 ]
B = [ 1 0 0 0 ] B = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} B = [ 1 0 0 0 ]
Test 1: A = [ 1 50 − 7 50 − 7 50 49 50 ] A = \begin{bmatrix} \frac{1}{50} & -\frac{7}{50} \\ -\frac{7}{50} & \frac{49}{50} \end{bmatrix} A = [ 50 1 − 50 7 − 50 7 50 49 ]
Check: A S = S B = [ − 1 0 7 0 ] AS = SB = \begin{bmatrix} -1 & 0 \\ 7 & 0 \end{bmatrix} A S = SB = [ − 1 7 0 0 ]
Example
Suppose A A A is the 2 × 2 2\times 2 2 × 2 matrix of rotation counterclockwise by θ = π 2 \theta = \frac{\pi}{2} θ = 2 π . Is A A A diagonalizable?
No! For v ⃗ ≠ 0 ⃗ \vec{v} \neq \vec{0} v = 0 , A v ⃗ A \vec{v} A v is never parallel to v ⃗ \vec{v} v .
A = [ 0 − 1 1 0 ] A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} A = [ 0 1 − 1 0 ]
No eigenvectors and no (real) eigenvalues.
Let V V V be a subspace of R n \mathbb{R}^{n} R n , Then, the matrix of projection proj v : R n → R n \text{proj}_{v} : \mathbb{R}^{n} \to \mathbb{R}^{n} proj v : R n → R n is diagonalizable.
Say dim ( V ) = K \text{dim}\left( V \right) = K dim ( V ) = K .
V ⊥ V^{\bot} V ⊥ has dimension n − k n-k n − k .
Basis for V V V : { v ⃗ 1 , v ⃗ 2 , v ⃗ 3 , ⋯ , v ⃗ k } \{ \vec{v}_1 , \vec{v}_2 , \vec{v}_3 , \cdots , \vec{v}_k \} { v 1 , v 2 , v 3 , ⋯ , v k }
proj v ( v ⃗ i ) = 1 v ⃗ i \text{proj}_{v}\left( \vec{v}_i \right) = 1 \vec{v}_i proj v ( v i ) = 1 v i for 1 ≤ i ≤ k 1\le i\le k 1 ≤ i ≤ k .
Basis for V ⊥ V^{\bot} V ⊥ : $\{ \vec{w}{k+1} , \vec{w} {k+2} , \cdots , \vec{w}_{n} \}$
proj v ( w ⃗ i ) = 0 w ⃗ i \text{proj}_{v}\left( \vec{w}_i \right) = 0 \vec{w}_i proj v ( w i ) = 0 w i for k + 1 ≤ i ≤ n k+1 \le i \le n k + 1 ≤ i ≤ n
S = [ ∣ ∣ ∣ ∣ v ⃗ 1 ⋯ v ⃗ k w ⃗ k + 1 ⋯ w ⃗ n ∣ ∣ ∣ ∣ ] S = \begin{bmatrix} | & & | & | & & | \\ \vec{v} _1 & \cdots & \vec{v} _k & \vec{w} _{k+1} & \cdots & \vec{w} _n \\ | & & | & | & & | \end{bmatrix} S = ⎣ ⎡ ∣ v 1 ∣ ⋯ ∣ v k ∣ ∣ w k + 1 ∣ ⋯ ∣ w n ∣ ⎦ ⎤
B = [ 1 0 ⋯ 0 0 1 ⋮ 0 0 0 ⋱ ⋮ 0 0 0 0 ] B = \begin{bmatrix} 1 & 0 & \cdots & 0 \\ 0 & 1 & \vdots & 0 \\ 0 & 0 & \ddots & \vdots \\ 0 & 0 & 0 & 0 \end{bmatrix} B = ⎣ ⎡ 1 0 0 0 0 1 0 0 ⋯ ⋮ ⋱ 0 0 0 ⋮ 0 ⎦ ⎤ (k k k amount of diagonal 1’s)
Example
Suppose A A A is n × n n\times n n × n and v ⃗ \vec{v} v is an eigenvector for A A A with eigenvalue λ = 4 \lambda = 4 λ = 4 .
1) Is v ⃗ \vec{v} v an eigenvector for A 2 A^{2} A 2 ?
A 2 v ⃗ = A ⋅ A v ⃗ = A 4 v ⃗ = 4 A v ⃗ = 4 ⋅ 4 v ⃗ = 16 v ⃗ A^{2}\vec{v} = A\cdot A \vec{v} = A 4\vec{v} = 4A\vec{v} = 4\cdot 4 \vec{v} = 16 \vec{v} A 2 v = A ⋅ A v = A 4 v = 4 A v = 4 ⋅ 4 v = 16 v
Yes! Eigenvalue is λ = 16 \lambda = 16 λ = 16 .
2) Is v ⃗ \vec{v} v an eigenvector for A − I n A - I_{n} A − I n ?
( A − I n ) v ⃗ = A v ⃗ − I n v ⃗ = 4 v ⃗ − v ⃗ = 3 v ⃗ \left( A - I_{n} \right) \vec{v} = A\vec{v} - I_{n}\vec{v} = 4\vec{v} - \vec{v} = 3\vec{v} ( A − I n ) v = A v − I n v = 4 v − v = 3 v
Yes! Eigenvalue is λ = 3 \lambda = 3 λ = 3 .
Question: Suppose A A A is an n × n n\times n n × n orthogonal matrix. What are possibilities for (real) eigenvalues for A A A ?
Note: We may not have any eigenvalue, e.g. the 2 × 2 2\times 2 2 × 2 (counterclockwise) rotation matrix with angle π 2 \frac{\pi}{2} 2 π .
Answer: λ = 1 \lambda = 1 λ = 1 or − 1 -1 − 1 only possibilities
∣ ∣ A v ⃗ ∣ ∣ = ∣ ∣ v ⃗ ∣ ∣ \mid \mid A \vec{v} \mid \mid = \mid \mid \vec{v} \mid \mid ∣∣ A v ∣∣=∣∣ v ∣∣
Suppose A v ⃗ = λ v ⃗ A \vec{v} = \lambda \vec{v} A v = λ v . Then, ∣ ∣ λ v ⃗ ∣ ∣ = ∣ ∣ v ⃗ ∣ ∣ → ∣ λ ∣ ∣ ∣ v ⃗ ∣ ∣ = ∣ ∣ v ⃗ ∣ ∣ \mid \mid \lambda \vec{v} \mid \mid = \mid \mid \vec{v} \mid \mid \to \mid \lambda \mid \mid \mid \vec{v} \mid \mid = \mid \mid \vec{v} \mid \mid ∣∣ λ v ∣∣=∣∣ v ∣∣→∣ λ ∣∣∣ v ∣∣=∣∣ v ∣∣ ; v ⃗ ≠ 0 ⃗ \vec{v} \neq \vec{0} v = 0
∣ λ ∣ = 1 \mid \lambda \mid = 1 ∣ λ ∣= 1
7.2 Finding Eigenvalues 7.2 Finding Eigenvalues
7.1 #7: If v ⃗ \vec{v} v is an eigenvector of the n × n n\times n n × n matrix A A A with associated eigenvalue λ \lambda λ ,
1) What can you say about ker ( A − λ I n ) \text{ker}\left( A - \lambda I_{n} \right) ker ( A − λ I n ) ?
We have A v ⃗ − λ v ⃗ = 0 ⃗ A \vec{v} - \lambda \vec{v} = \vec{0} A v − λ v = 0
Equivalently, ( A − λ I ) v ⃗ = 0 ⃗ \left( A - \lambda I \right) \vec{v} = \vec{0} ( A − λ I ) v = 0 .
ker ( A − λ I ) \text{ker}\left( A - \lambda I \right) ker ( A − λ I ) has dimension at least 1.
2) Is the matrix A − λ I n A - \lambda I_{n} A − λ I n invertible?
No! Nullity ≥ 1 \ge 1 ≥ 1 . Rank < n
Notice: λ \lambda λ is an eigenvalue for A A A if and only if det ( A − λ I ) = 0 \text{det}\left( A - \lambda I \right) = 0 det ( A − λ I ) = 0 .
Definition:
The characteristic equation of a matrix A A A :
det ( A − λ I ) = 0 \text{det} (A - \lambda I) = 0 det ( A − λ I ) = 0
Solutions λ \lambda λ to this equation are eigenvalues.
Question: When is 0 an eigenvalue for A A A ?
Answer:
Precisely when A A A is not invertible. A − 0 I = A A - 0I = A A − 0 I = A
Example
Find the eigenvalues of A = [ 1 2 5 4 ] A = \begin{bmatrix} 1 & 2 \\ 5 & 4 \end{bmatrix} A = [ 1 5 2 4 ] .
λ I 2 = [ λ 0 0 λ ] \lambda I_{2}= \begin{bmatrix} \lambda & 0 \\ 0 & \lambda \end{bmatrix} λ I 2 = [ λ 0 0 λ ]
0 = det ( A − λ I ) = ∣ 1 − λ 2 5 4 − λ ∣ = ( 1 − λ ) ( 4 − λ ) − 10 0 = \text{det}\left( A - \lambda I \right) = \begin{vmatrix} 1-\lambda & 2 \\ 5 & 4-\lambda \end{vmatrix} = \left( 1-\lambda \right) (4- \lambda ) - 10 0 = det ( A − λ I ) = ∣ ∣ 1 − λ 5 2 4 − λ ∣ ∣ = ( 1 − λ ) ( 4 − λ ) − 10
= λ 2 − 4 λ − λ + 4 − 10 = λ 2 − 5 λ − 6 = ( λ − 6 ) ( λ + 1 ) = \lambda ^{2} - 4 \lambda - \lambda + 4 - 10 = \lambda ^{2} - 5 \lambda - 6 = (\lambda - 6 ) (\lambda + 1) = λ 2 − 4 λ − λ + 4 − 10 = λ 2 − 5 λ − 6 = ( λ − 6 ) ( λ + 1 )
0 = ( λ − 6 ) ( λ + 1 ) 0 = \left( \lambda -6 \right) \left( \lambda + 1 \right) 0 = ( λ − 6 ) ( λ + 1 )
λ = 6 , − 1 \lambda = 6, -1 λ = 6 , − 1
Example
Find the eigenvalues of A = [ 1 2 2 4 ] A = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix} A = [ 1 2 2 4 ] .
0 = ∣ 1 − λ 2 2 4 − λ ∣ = ( 1 − λ ) ( 4 − λ ) − 4 = λ 2 − 5 λ + 4 − 4 = λ ( λ − 5 ) 0 = \begin{vmatrix} 1-\lambda & 2 \\ 2 & 4-\lambda \end{vmatrix} = \left( 1- \lambda \right) \left( 4 - \lambda \right) - 4 = \lambda ^{2} - 5 \lambda + 4 - 4 = \lambda \left( \lambda - 5 \right) 0 = ∣ ∣ 1 − λ 2 2 4 − λ ∣ ∣ = ( 1 − λ ) ( 4 − λ ) − 4 = λ 2 − 5 λ + 4 − 4 = λ ( λ − 5 )
λ = 0 , 5 \lambda = 0, 5 λ = 0 , 5
Notice:
Product: 0 ⋅ 5 = det ( A ) 0\cdot 5 = \text{det}\left( A \right) 0 ⋅ 5 = det ( A )
Sum: 0+5= sum of diagonal entries. Trace of A A A .
Example
A = [ 0 − 1 1 0 ] A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} A = [ 0 1 − 1 0 ] (Matrix of rotation by counterclockwise θ = π 2 \theta = \frac{\pi}{2} θ = 2 π )
0 = ∣ A − λ I ∣ = ∣ − λ − 1 1 − λ ∣ = λ 2 + 1 0 = \mid A - \lambda I \mid = \begin{vmatrix} -\lambda & -1 \\ 1 & -\lambda \end{vmatrix} = \lambda ^{2} + 1 0 =∣ A − λ I ∣= ∣ ∣ − λ 1 − 1 − λ ∣ ∣ = λ 2 + 1
No real eigenvalues
Generally for n × n n\times n n × n matrix, λ 1 , λ 2 , ⋯ , λ n \lambda_1 , \lambda_2 , \cdots , \lambda _n λ 1 , λ 2 , ⋯ , λ n
λ 1 λ 2 λ 3 ⋯ λ n = det ( A ) \lambda_1\lambda_2\lambda_3 \cdots \lambda_n = \text{det}\left( A \right) λ 1 λ 2 λ 3 ⋯ λ n = det ( A )
λ 1 + λ 2 + λ 3 + ⋯ + λ n = tr ( A ) \lambda_1 + \lambda_2 + \lambda_3 + \cdots + \lambda_n = \text{tr}\left( A \right) λ 1 + λ 2 + λ 3 + ⋯ + λ n = tr ( A ) (Trace)
Moreover, for a general 2 × 2 2\times 2 2 × 2 matrix A = [ a b c d ] A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} A = [ a c b d ] , we see
det ( A − λ I ) = [ a − λ b c d − λ ] = ( a − λ ) ( d − λ ) − b c = λ 2 − a λ − d λ + a d − b c = λ 2 − ( a + d ) λ + ( a d − b c ) = λ 2 − tr ( A ) λ + det ( A ) \begin{align*}
\text{det}(A - \lambda I) & = \begin{bmatrix} a-\lambda & b \\ c & d-\lambda \end{bmatrix} \\
&= (a - \lambda) (d - \lambda) - bc \\
&= \lambda^2 - a\lambda - d \lambda + ad - bc \\
&= \lambda^2 - (a+d)\lambda + (ad-bc) \\
&= \lambda^2 - \text{tr}(A) \lambda + \text{det}(A)
\end{align*} det ( A − λ I ) = [ a − λ c b d − λ ] = ( a − λ ) ( d − λ ) − b c = λ 2 − aλ − d λ + a d − b c = λ 2 − ( a + d ) λ + ( a d − b c ) = λ 2 − tr ( A ) λ + det ( A )
Example
Find eigenvalues for A = [ 1 3 4 0 3 2 0 0 − 1 ] A = \begin{bmatrix} 1 & 3 & 4 \\ 0 & 3 & 2 \\ 0 & 0 & -1 \end{bmatrix} A = ⎣ ⎡ 1 0 0 3 3 0 4 2 − 1 ⎦ ⎤ .
= ∣ 1 − λ 3 4 0 3 − λ 2 0 0 − 1 − λ ∣ = ( 1 − λ ) ( 3 − λ ) ( − 1 − λ ) = \begin{vmatrix} 1-\lambda & 3 & 4 \\ 0 & 3-\lambda & 2 \\ 0 & 0 & -1-\lambda \end{vmatrix} = \left( 1- \lambda \right) \left( 3 - \lambda \right) \left( -1-\lambda \right) = ∣ ∣ 1 − λ 0 0 3 3 − λ 0 4 2 − 1 − λ ∣ ∣ = ( 1 − λ ) ( 3 − λ ) ( − 1 − λ )
λ = 1 , 3 , − 1 \lambda = 1, 3, -1 λ = 1 , 3 , − 1
We see:
When A A A is upper triangular (or lower triangular), eigenvalues of A A A are along diagonal
Any matrix A A A : det ( A − λ I ) \text{det}\left( A- \lambda I \right) det ( A − λ I ) is polynomial in λ \lambda λ . Called characteristic polynomial f A ( λ ) f_{A}\left( \lambda \right) f A ( λ )
If A A A is n × n n\times n n × n , the characteristic polynomial of A A A has degree n n n and is of the form
f A ( λ ) = ( − λ ) n + tr ( A ) ( − λ ) n − 1 + ⋯ + det ( A ) f_A (\lambda) = (-\lambda)^n + \text{tr}(A)(-\lambda)^{n-1} + \cdots + \text{det}(A) f A ( λ ) = ( − λ ) n + tr ( A ) ( − λ ) n − 1 + ⋯ + det ( A )
Eigenvalues of A ↔ Roots of characteristic polynomial \text{Eigenvalues of } A \leftrightarrow \text{Roots of characteristic polynomial} Eigenvalues of A ↔ Roots of characteristic polynomial
Definition:
An eigenvalue λ 0 \lambda_{0} λ 0 of an n × n n\times n n × n matrix A A A has algebraic multiplicity k k k (notation: almu ( λ 0 ) = k \text{almu}\left( \lambda_{0} \right) = k almu ( λ 0 ) = k ) provided
f A ( λ ) = det ( A − λ I ) = ( λ 0 − λ ) k g ( λ ) f_{A}\left( \lambda \right) = \text{det}\left( A - \lambda I \right) = \left( \lambda _{0} - \lambda \right) ^{k} g(\lambda) f A ( λ ) = det ( A − λ I ) = ( λ 0 − λ ) k g ( λ )
Where g ( λ 0 ) ≠ 0 g\left( \lambda_{0} \right) \neq 0 g ( λ 0 ) = 0 .
Example
A = [ 5 0 0 2 5 0 1 2 5 ] A = \begin{bmatrix} 5 & 0 & 0 \\ 2 & 5 & 0 \\ 1 & 2 & 5 \end{bmatrix} A = ⎣ ⎡ 5 2 1 0 5 2 0 0 5 ⎦ ⎤ has eigenvalue λ = 5 \lambda = 5 λ = 5 with…
almu ( 5 ) = 3 \text{almu} (5) = 3 almu ( 5 ) = 3 as det ( A − λ I ) = ( 5 − λ ) 3 \text{det}\left( A - \lambda I \right) = \left( 5 - \lambda \right) ^{3} det ( A − λ I ) = ( 5 − λ ) 3
Example
Find eigenvalues with algebraic multiplicities for A = [ 7 0 3 − 3 2 − 3 − 3 0 1 ] A = \begin{bmatrix} 7 & 0 & 3 \\ -3 & 2 & -3 \\ -3 & 0 & 1 \end{bmatrix} A = ⎣ ⎡ 7 − 3 − 3 0 2 0 3 − 3 1 ⎦ ⎤ .
∣ 7 − λ 0 3 − 3 2 − λ − 3 − 3 0 1 − λ ∣ = ( − 1 ) 2 + 2 ( 2 − λ ) ∣ 7 − λ 3 − 3 1 − λ ∣ = ( 2 − λ ) [ ( 7 − λ ) ( 1 − λ ) + 9 ] = ( 2 − λ ) ( λ 2 − 8 λ + 7 + 9 ) = ( 2 − λ ) ( λ − 4 ) 2 \begin{align*}
\begin{vmatrix} 7-\lambda & 0 & 3 \\\ -3 & 2-\lambda & -3 \\\ -3 & 0 & 1-\lambda \end{vmatrix} &= \left( -1 \right) ^{2+2} \left( 2-\lambda \right) \begin{vmatrix} 7-\lambda & 3 \\\ -3 & 1-\lambda \end{vmatrix} \\
&= (2-\lambda) [\left( 7- \lambda \right) \left( 1-\lambda \right) + 9 ] \\
&= (2-\lambda ) \left( \lambda ^{2} - 8\lambda + 7 + 9 \right) \\
&= (2-\lambda ) (\lambda - 4) ^{2} \\
\end{align*} ∣ ∣ 7 − λ − 3 − 3 0 2 − λ 0 3 − 3 1 − λ ∣ ∣ = ( − 1 ) 2 + 2 ( 2 − λ ) ∣ ∣ 7 − λ − 3 3 1 − λ ∣ ∣ = ( 2 − λ ) [ ( 7 − λ ) ( 1 − λ ) + 9 ] = ( 2 − λ ) ( λ 2 − 8 λ + 7 + 9 ) = ( 2 − λ ) ( λ − 4 ) 2
λ = 2 , 4 , 4 \lambda = 2, 4, 4 λ = 2 , 4 , 4
almu ( 4 ) = 2 \text{almu}(4) = 2 almu ( 4 ) = 2
almu ( 2 ) = 1 \text{almu}(2) = 1 almu ( 2 ) = 1
Exercise : Find eigenvalues with algebraic multiplicities for A = [ 2 1 0 − 1 4 0 5 3 3 ] A = \begin{bmatrix} 2 & 1 & 0 \\ -1 & 4 & 0 \\ 5 & 3 & 3 \end{bmatrix} A = ⎣ ⎡ 2 − 1 5 1 4 3 0 0 3 ⎦ ⎤ .
∣ 2 − λ 1 0 − 1 4 − λ 0 5 3 3 − λ ∣ = ( 2 − λ ) ∣ 2 − λ 1 − 1 4 − λ ∣ = ( 3 − λ ) ( ( 2 − λ ) ( 4 − λ ) + 1 ) = ( 3 − λ ) ( λ 2 − 6 λ + 8 + 1 ) = ( 3 − λ ) 3 \begin{align*}
\begin{vmatrix} 2-\lambda & 1 & 0 \\\ -1 & 4-\lambda & 0 \\\ 5 & 3 & 3-\lambda \end{vmatrix} &= (2-\lambda ) \begin{vmatrix} 2-\lambda & 1 \\\ -1 & 4-\lambda \end{vmatrix} \\
&= (3-\lambda) ((2-\lambda ) (4-\lambda ) + 1) \\
&= (3-\lambda ) (\lambda ^2 - 6\lambda + 8 + 1) \\
&= (3-\lambda )^3
\end{align*} ∣ ∣ 2 − λ − 1 5 1 4 − λ 3 0 0 3 − λ ∣ ∣ = ( 2 − λ ) ∣ ∣ 2 − λ − 1 1 4 − λ ∣ ∣ = ( 3 − λ ) (( 2 − λ ) ( 4 − λ ) + 1 ) = ( 3 − λ ) ( λ 2 − 6 λ + 8 + 1 ) = ( 3 − λ ) 3
λ = 3 , 3 , 3 \lambda = 3, 3, 3 λ = 3 , 3 , 3
almu ( 3 ) = 3 \text{almu}(3) = 3 almu ( 3 ) = 3
Remarks :
1) A degree n n n polynomial has at most n n n roots (counted with multiplicities) f a ( λ ) f_{a}\left( \lambda \right) f a ( λ )
An n × n n\times n n × n matrix A A A has no more than n n n eigenvalues (counting algebraic multiplicities)
Example
Find (real) eigenvalues for matrix A = [ 8 1 3 6 0 2 1 − 1 0 0 0 − 4 0 0 1 0 ] A = \begin{bmatrix} 8 & 1 & 3 & 6 \\ 0 & 2 & 1 & -1 \\ 0 & 0 & 0 & -4 \\ 0 & 0 & 1 & 0 \end{bmatrix} A = ⎣ ⎡ 8 0 0 0 1 2 0 0 3 1 0 1 6 − 1 − 4 0 ⎦ ⎤ .
Note: rref ( A ) = I 4 \text{rref}\left( A \right) = I_{4} rref ( A ) = I 4
∣ 8 − λ 1 3 6 0 2 − λ 1 − 1 0 0 − λ − 4 0 0 1 − λ ∣ = ( 8 − λ ) ∣ 2 − λ 1 − 1 0 − λ − 4 0 1 − λ ∣ = ( 8 − λ ) ( 2 − λ ) ∣ − λ − 4 1 − λ ∣ = ( 8 − λ ) ( 2 − λ ) ( λ 2 + 4 ) \begin{align*}
\begin{vmatrix} 8-\lambda & 1 & 3 & 6 \\\ 0 & 2-\lambda & 1 & -1 \\\ 0 & 0 & -\lambda & -4 \\\ 0 & 0 & 1 & -\lambda \end{vmatrix} &= (8-\lambda ) \begin{vmatrix} 2-\lambda & 1 & -1 \\\ 0 & -\lambda & -4 \\\ 0 & 1 & -\lambda \end{vmatrix} \\
&= (8-\lambda ) (2-\lambda ) \begin{vmatrix} -\lambda & -4 \\\ 1 & -\lambda \end{vmatrix} \\
&= (8-\lambda ) (2-\lambda ) (\lambda ^2 + 4)
\end{align*} ∣ ∣ 8 − λ 0 0 0 1 2 − λ 0 0 3 1 − λ 1 6 − 1 − 4 − λ ∣ ∣ = ( 8 − λ ) ∣ ∣ 2 − λ 0 0 1 − λ 1 − 1 − 4 − λ ∣ ∣ = ( 8 − λ ) ( 2 − λ ) ∣ ∣ − λ 1 − 4 − λ ∣ ∣ = ( 8 − λ ) ( 2 − λ ) ( λ 2 + 4 )
λ = 8 , 2 \lambda = 8, 2 λ = 8 , 2
almu ( 8 ) = 1 \text{almu}(8) = 1 almu ( 8 ) = 1
almu ( 2 ) = 1 \text{almu}(2) = 1 almu ( 2 ) = 1
2) If n n n is odd and A A A is an n × n n\times n n × n matrix then A A A has at least one eigenvalue.
Reason: Any odd degree polynomial has at least one root.
Example
Consider the matrix A = [ 1 k 1 1 ] A = \begin{bmatrix} 1 & k \\ 1 & 1 \end{bmatrix} A = [ 1 1 k 1 ] .
1) For what value(s) of k k k does A A A have two distinct eigenvalues?
2) For what value(s) of k k k does A A A have no real eigenvalues?
Solution
Recall:
a x 2 + b x + c = 0 ax^{2} + bx + c =0 a x 2 + b x + c = 0
Roots: x = − b ± b 2 − 4 a c 2 a x = \frac{-b \pm \sqrt{b^{2} - 4ac} }{2a} x = 2 a − b ± b 2 − 4 a c
f A ( λ ) = λ 2 − tr ( A ) λ + det ( A ) f_{A}( \lambda ) = \lambda ^{2} - \text{tr}\left( A \right) \lambda + \text{det}\left( A \right) f A ( λ ) = λ 2 − tr ( A ) λ + det ( A )
= λ 2 − 2 λ + ( 1 − k ) = \lambda ^{2} - 2 \lambda + (1-k) = λ 2 − 2 λ + ( 1 − k )
b 2 − 4 a c = 4 − 4 ( 1 − k ) { > 0 2 distinct eigenvalues < 0 no eigenvalues b^2 - 4ac = 4-4(1-k) \begin{cases} >0 & \text{2 distinct eigenvalues} \\ <0 & \text{no eigenvalues} \end{cases} b 2 − 4 a c = 4 − 4 ( 1 − k ) { > 0 < 0 2 distinct eigenvalues no eigenvalues
4 − 4 ( 1 − k ) = 4 k 4-4(1-k) = 4k 4 − 4 ( 1 − k ) = 4 k
No eigenvalues: k<0
2 Distinct eigenvalues: k>0
Exercise : For what value(s) of k k k does the matrix A = [ − 1 k 2 4 3 7 0 0 2 ] A = \begin{bmatrix} -1 & k & 2 \\ 4 & 3 & 7 \\ 0 & 0 & 2 \end{bmatrix} A = ⎣ ⎡ − 1 4 0 k 3 0 2 7 2 ⎦ ⎤ have λ = 5 \lambda = 5 λ = 5 as an eigenvalue?
Restated: For what k k k is det ( A − 5 I ) = 0 \text{det}\left( A - 5I \right) = 0 det ( A − 5 I ) = 0
0 = ∣ A − 5 I ∣ = ∣ − 6 k 2 4 − 2 7 0 0 − 3 ∣ = ( − 1 ) 3 + 3 − 3 ∣ − 6 k 4 − 2 ∣ 0 = \mid A - 5I \mid = \begin{vmatrix} -6 & k & 2 \\ 4 & -2 & 7 \\ 0 & 0 & -3 \end{vmatrix} = (-1)^{3+3} -3 \begin{vmatrix} -6 & k \\ 4 & -2 \end{vmatrix} 0 =∣ A − 5 I ∣= ∣ ∣ − 6 4 0 k − 2 0 2 7 − 3 ∣ ∣ = ( − 1 ) 3 + 3 − 3 ∣ ∣ − 6 4 k − 2 ∣ ∣
= − 3 ( 12 − 4 k ) = -3 (12-4k) = − 3 ( 12 − 4 k )
4 k = 12 4k = 12 4 k = 12
k = 3 k=3 k = 3
Quiz Preparation
1) (a) Find the least-squares solutions to A x ⃗ = b ⃗ A \vec{x} = \vec{b} A x = b where A = [ 1 2 0 0 1 2 ] A = \begin{bmatrix} 1 & 2 \\ 0 & 0 \\ 1 & 2 \end{bmatrix} A = ⎣ ⎡ 1 0 1 2 0 2 ⎦ ⎤ and b ⃗ = [ 3 1 3 ] \vec{b} = \begin{bmatrix} 3 \\ 1 \\ 3 \end{bmatrix} b = ⎣ ⎡ 3 1 3 ⎦ ⎤ .
Solution
A T A = [ 1 0 1 2 0 2 ] [ 1 2 0 0 1 2 ] = [ 2 4 4 8 ] A^{T}A = \begin{bmatrix} 1 & 0 & 1 \\ 2 & 0 & 2 \end{bmatrix} \begin{bmatrix} 1 & 2 \\ 0 & 0 \\ 1 & 2 \end{bmatrix} = \begin{bmatrix} 2 & 4 \\ 4 & 8 \end{bmatrix} A T A = [ 1 2 0 0 1 2 ] ⎣ ⎡ 1 0 1 2 0 2 ⎦ ⎤ = [ 2 4 4 8 ]
Normal Equation: [ 2 4 4 8 ] [ x 1 x 2 ] [ 6 12 ] \begin{bmatrix} 2 & 4 \\ 4 & 8 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \begin{bmatrix} 6 \\ 12 \end{bmatrix} [ 2 4 4 8 ] [ x 1 x 2 ] [ 6 12 ]
A T b ⃗ = [ 1 0 1 2 0 2 ] [ 3 1 3 ] = [ 6 12 ] A^{T}\vec{b} = \begin{bmatrix} 1 & 0 & 1 \\ 2 & 0 & 2 \end{bmatrix} \begin{bmatrix} 3 \\ 1 \\ 3 \end{bmatrix} = \begin{bmatrix} 6 \\ 12 \end{bmatrix} A T b = [ 1 2 0 0 1 2 ] ⎣ ⎡ 3 1 3 ⎦ ⎤ = [ 6 12 ]
[ 2 4 ∣ 6 4 8 ∣ 12 ] → [ 1 2 ∣ 3 4 8 ∣ 12 ] \begin{bmatrix} 2 & 4 & | & 6 \\ 4 & 8 & | & 12 \end{bmatrix} \to \begin{bmatrix} 1 & 2 & | & 3 \\ 4 & 8 & | & 12 \end{bmatrix} [ 2 4 4 8 ∣ ∣ 6 12 ] → [ 1 4 2 8 ∣ ∣ 3 12 ]
→ [ 1 2 ∣ 3 0 0 ∣ 0 ] \to \begin{bmatrix} 1 & 2 & | & 3 \\ 0 & 0 & | & 0 \end{bmatrix} → [ 1 0 2 0 ∣ ∣ 3 0 ]
x 2 = t x_2 = t x 2 = t free
x 1 = 3 − 2 t x_1 = 3-2t x 1 = 3 − 2 t
x ⃗ ⋆ = [ 3 − 2 t t ] \vec{x}^{\star} = \begin{bmatrix} 3-2t \\ t \end{bmatrix} x ⋆ = [ 3 − 2 t t ]
(b) Compute the error ∣ ∣ b ⃗ − A x ⃗ ⋆ ∣ ∣ \mid \mid \vec{b} - A \vec{x}^{\star} \mid \mid ∣∣ b − A x ⋆ ∣∣ . Show your work .
Solution
∣ ∣ [ 3 1 3 ] − [ 1 2 0 0 1 2 ] [ 3 − 2 t t ] ∣ ∣ = ∣ ∣ [ 3 1 3 ] − [ 3 − 2 t + 2 t 0 3 − 2 t + 2 t ] ∣ ∣ \mid \mid \begin{bmatrix} 3 \\ 1 \\ 3 \end{bmatrix} - \begin{bmatrix} 1 & 2 \\ 0 & 0 \\ 1 & 2 \end{bmatrix} \begin{bmatrix} 3-2t \\ t \end{bmatrix} \mid \mid = \mid \mid \begin{bmatrix} 3 \\ 1 \\ 3 \end{bmatrix} - \begin{bmatrix} 3-2t+2t \\ 0 \\ 3 - 2t + 2t \end{bmatrix} \mid \mid ∣∣ ⎣ ⎡ 3 1 3 ⎦ ⎤ − ⎣ ⎡ 1 0 1 2 0 2 ⎦ ⎤ [ 3 − 2 t t ] ∣∣=∣∣ ⎣ ⎡ 3 1 3 ⎦ ⎤ − ⎣ ⎡ 3 − 2 t + 2 t 0 3 − 2 t + 2 t ⎦ ⎤ ∣∣
= ∣ ∣ [ 0 1 0 ] ∣ ∣ = 0 + 1 2 + 0 = 1 = \mid \mid \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \mid \mid = \sqrt{0 + 1^2 + 0} = 1 =∣∣ ⎣ ⎡ 0 1 0 ⎦ ⎤ ∣∣= 0 + 1 2 + 0 = 1
2) Suppose A A A and B B B are 3 × 3 3\times 3 3 × 3 matrices with det ( A ) = 2 \text{det}\left( A \right) = 2 det ( A ) = 2 and det ( B ) = 3 \text{det}\left( B \right) = 3 det ( B ) = 3 . Calculate det ( − 2 A 2 B T A − 1 ) \text{det}\left( -2A^{2}B^{T}A^{-1} \right) det ( − 2 A 2 B T A − 1 ) . Show your work .
Solution
( − 2 ) 3 ( det ( A ) ) 2 det ( B ) ⋅ 1 det ( A ) = − 8 ⋅ 4 ⋅ 3 ⋅ 1 2 = − 48 (-2)^3 (\text{det}(A))^2 \text{det}(B) \cdot \frac{1}{\text{det}(A)} = -8 \cdot 4 \cdot 3 \cdot \frac{1}{2} = -48 ( − 2 ) 3 ( det ( A ) ) 2 det ( B ) ⋅ det ( A ) 1 = − 8 ⋅ 4 ⋅ 3 ⋅ 2 1 = − 48
3) Let A = ∣ 1 2 3 4 0 1 2 1 2 4 6 10 0 3 6 5 ∣ A = \begin{vmatrix} 1 & 2 & 3 & 4 \\ 0 & 1 & 2 & 1 \\ 2 & 4 & 6 & 10 \\ 0 & 3 & 6 & 5 \end{vmatrix} A = ∣ ∣ 1 0 2 0 2 1 4 3 3 2 6 6 4 1 10 5 ∣ ∣ .
(a) Compute the determinant of A A A . Show your work .
Solution
det ( A ) = ∣ 1 2 3 4 0 1 2 1 0 0 0 2 0 3 6 5 ∣ = ∣ 1 2 1 0 0 2 3 6 5 ∣ = ( − 1 ) 2 + 3 ⋅ 2 ∣ 1 2 3 6 ∣ = − 2 ( 6 − 6 ) = 0 \begin{align*}
\text{det}(A) &= \begin{vmatrix} 1 & 2 & 3 &4 \\ 0 & 1 & 2 & 1 \\ 0 & 0 & 0 & 2 \\ 0 & 3 & 6 & 5 \end{vmatrix} \\
&= \begin{vmatrix} 1 & 2 & 1 \\ 0 & 0 & 2 \\ 3 & 6 & 5 \end{vmatrix} \\
&= (-1)^{2+3} \cdot 2 \begin{vmatrix} 1 & 2 \\ 3 & 6 \end{vmatrix} \\
&= -2(6-6)\\
&= 0
\end{align*} det ( A ) = ∣ ∣ 1 0 0 0 2 1 0 3 3 2 0 6 4 1 2 5 ∣ ∣ = ∣ ∣ 1 0 3 2 0 6 1 2 5 ∣ ∣ = ( − 1 ) 2 + 3 ⋅ 2 ∣ ∣ 1 3 2 6 ∣ ∣ = − 2 ( 6 − 6 ) = 0
(b) For the above matrix A A A , Select all that apply.
A : A A A is invertible.
B : A A A is not invertible.
C : A A A is an orthogonal matrix.
D : det ( − A ) = − det ( A ) \text{det}\left( -A \right) = - \text{det}\left( A \right) det ( − A ) = − det ( A ) .
E : det ( A − 1 A T A ) = det ( A ) \text{det}\left( A^{-1}A^{T}A \right) = \text{det}\left( A \right) det ( A − 1 A T A ) = det ( A )
Solution
Because det ( A ) = 0 \text{det}\left( A \right) = 0 det ( A ) = 0 , the matrix is not invertible.
Also recall that for an n × n n\times n n × n orthogonal matrix, the following properties hold:
Columns are orthonormal (unit and perpendicular)
A T A = I n A^{T}A = I_{n} A T A = I n
Will be invertible
det ( A ) = ± 1 \text{det}\left( A \right) = \pm 1 det ( A ) = ± 1
Therefore, B and D are correct.
4) Justify your answers
(a) Suppose T : R 2 → R 2 T : \mathbb{R}^{2} \to \mathbb{R}^{2} T : R 2 → R 2 gives rotation through an angle of π 3 \frac{\pi}{3} 3 π in the counterclockwise direction. Let B B B be the matrix of the transformation T T T . Is B B B diagonalizable?
Solution
No; B B B has no eigenvectors as for v ⃗ = 0 ⃗ \vec{v}= \vec{0} v = 0 , B v ⃗ B\vec{v} B v is never a multiple of v ⃗ \vec{v} v .
(b) Let A = [ 1 1 3 1 3 1 3 1 1 ] A = \begin{bmatrix} 1 & 1 & 3 \\ 1 & 3 & 1 \\ 3 & 1 & 1 \end{bmatrix} A = ⎣ ⎡ 1 1 3 1 3 1 3 1 1 ⎦ ⎤ . Is v ⃗ = [ 1 − 2 1 ] \vec{v} = \begin{bmatrix} 1 \\ -2 \\ 1 \end{bmatrix} v = ⎣ ⎡ 1 − 2 1 ⎦ ⎤ an eigenvector of A A A ? If so, what is the corresponding eigenvalue?
Solution
[ 1 1 3 1 3 1 3 1 1 ] [ 1 − 2 1 ] = [ 2 − 4 2 ] = 2 [ 1 − 2 1 ] \begin{bmatrix} 1 & 1 & 3 \\ 1 & 3 & 1 \\ 3 & 1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ -2 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ -4 \\ 2 \end{bmatrix} = 2 \begin{bmatrix} 1 \\ -2 \\ 1 \end{bmatrix} ⎣ ⎡ 1 1 3 1 3 1 3 1 1 ⎦ ⎤ ⎣ ⎡ 1 − 2 1 ⎦ ⎤ = ⎣ ⎡ 2 − 4 2 ⎦ ⎤ = 2 ⎣ ⎡ 1 − 2 1 ⎦ ⎤
Yes as A v ⃗ A\vec{v} A v is a multiple of v ⃗ \vec{v} v . We see λ = 2 \lambda = 2 λ = 2 .
Example
A = [ cos ( θ ) − sin ( θ ) sin ( θ ) cos ( θ ) ] A = \begin{bmatrix} \cos \left( \theta \right) & - \sin \left( \theta \right) \\ \sin \left( \theta \right) & \cos \left( \theta \right) \end{bmatrix} A = [ cos ( θ ) sin ( θ ) − sin ( θ ) cos ( θ ) ]
Rotation counterclockwise by θ \theta θ .
tr ( A ) = 2 cos ( θ ) \text{tr}\left( A \right) = 2 \cos \left( \theta \right) tr ( A ) = 2 cos ( θ )
det ( A ) = cos 2 ( θ ) + sin 2 θ = 1 \text{det}\left( A \right) = \cos ^{2} (\theta) + \sin ^{2} \theta = 1 det ( A ) = cos 2 ( θ ) + sin 2 θ = 1
f A ( λ ) = λ − tr ( A ) λ + det ( A ) f_{A} \left( \lambda \right) = \lambda - \text{tr}\left( A \right) \lambda + \text{det}\left( A \right) f A ( λ ) = λ − tr ( A ) λ + det ( A )
= λ 2 − 2 cos ( θ ) λ + 1 = \lambda ^{2} - 2 \cos \left( \theta \right) \lambda + 1 = λ 2 − 2 cos ( θ ) λ + 1
b 2 − 4 a c b^{2} - 4ac b 2 − 4 a c
4 cos 2 ( θ ) − 4 ≥ 0 4 \cos ^{2}\left( \theta \right) - 4 \ge 0 4 cos 2 ( θ ) − 4 ≥ 0
Only when cos 2 θ = 1 ⟹ cos θ = ± 1 \cos ^{2} \theta = 1 \implies \cos \theta = \pm 1 cos 2 θ = 1 ⟹ cos θ = ± 1
[ 1 0 0 1 ] , [ − 1 0 0 − 1 ] \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} , \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix} [ 1 0 0 1 ] , [ − 1 0 0 − 1 ]
The above matrices are the only rotation matrices with eigenvalues.
3) Suppose A A A is an n × n n\times n n × n matrix. Then, f A ( λ ) = f A T ( λ ) f_{A}\left( \lambda \right) = f_{A^{T}} \left( \lambda \right) f A ( λ ) = f A T ( λ ) .
Proof
Note: A T − λ I = ( A − λ I ) T A^{T} - \lambda I = \left( A - \lambda I \right) ^{T} A T − λ I = ( A − λ I ) T
f A ( λ ) = det ( A − λ I ) = det ( ( A − λ I ) T ) (Property of determinants) = det ( A T − λ I ) (Using note) = f A T ( λ ) \begin{align*}
f_A (\lambda) &= \text{det}(A - \lambda I) & \\
&= \text{det}\left( \left( A - \lambda I \right) ^{T} \right) & \text{(Property of determinants)}\\
&= \text{det} \left( A^T - \lambda I \right) & \text{(Using note)} \\
&= f_{A^T} ( \lambda ) &
\end{align*} f A ( λ ) = det ( A − λ I ) = det ( ( A − λ I ) T ) = det ( A T − λ I ) = f A T ( λ ) (Property of determinants) (Using note)
A A A and A T A^{T} A T have same eigenvalues with algebraic multiplicities.
Note: A A A and A T A^{T} A T do not necessarily have the same eigenvectors.
A = [ 0 0 1 0 ] A = \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} A = [ 0 1 0 0 ] has eigenvector v ⃗ = [ 0 1 ] \vec{v} = \begin{bmatrix} 0 \\ 1 \end{bmatrix} v = [ 0 1 ] corresponding to eigenvalue λ = 0 \lambda = 0 λ = 0 . A v ⃗ = 0 v ⃗ A \vec{v} = 0 \vec{v} A v = 0 v
A T = [ 0 1 0 0 ] A^{T} = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} A T = [ 0 0 1 0 ] . A T v ⃗ = [ 0 1 0 0 ] [ 0 1 ] = [ 1 0 ] A^{T}\vec{v} = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \end{bmatrix} A T v = [ 0 0 1 0 ] [ 0 1 ] = [ 1 0 ] (Not a multiple of v ⃗ \vec{v} v ). [ 0 1 ] \begin{bmatrix} 0 \\ 1 \end{bmatrix} [ 0 1 ] is not an eigenvector for A T A^{T} A T .
7.3 Finding Eigenvectors 7.3 Finding Eigenvectors
Definition:
Let A A A be an n × n n\times n n × n matrix with eigenvalue λ \lambda λ . The eigenspace associated to λ \lambda λ is
E λ = ker ( A − λ I ) = { v ⃗ ∈ R n : A v ⃗ = λ v ⃗ } E_\lambda = \text{ker}(A - \lambda I) = \{ \vec{v} \in \mathbb{R}^n : A \vec{v} = \lambda \vec{v} \} E λ = ker ( A − λ I ) = { v ∈ R n : A v = λ v }
Note: Nonzero vectors in E λ E_{ \lambda } E λ are eigenvectors for A A A with eigenvalue λ \lambda λ .
Example
A = [ 1 2 5 4 ] A = \begin{bmatrix} 1 & 2 \\ 5 & 4 \end{bmatrix} A = [ 1 5 2 4 ] has eigenvalues λ = − 1 , 6 \lambda = -1, 6 λ = − 1 , 6 . Find a basis for each eigenspace.
1) For λ = − 1 : A + I = [ 2 2 5 5 ] \lambda = -1 : A + I = \begin{bmatrix} 2 & 2 \\ 5 & 5 \end{bmatrix} λ = − 1 : A + I = [ 2 5 2 5 ]
→ rref [ 1 1 0 0 ] \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix} → rref [ 1 0 1 0 ]
x 2 = t x_2 = t x 2 = t (free)
x 1 = − t x_1 = -t x 1 = − t
[ − t t ] \begin{bmatrix} -t \\ t \end{bmatrix} [ − t t ]
Basis: { [ − 1 1 ] } \{ \begin{bmatrix} -1 \\ 1 \end{bmatrix} \} { [ − 1 1 ] }
2) For λ = 6 : A − 6 I = [ − 5 2 5 − 2 ] \lambda = 6 : A - 6I = \begin{bmatrix} -5 & 2 \\ 5 & -2 \end{bmatrix} λ = 6 : A − 6 I = [ − 5 5 2 − 2 ]
→ rref [ 5 − 2 0 0 ] \overset{\text{rref}}{\to} \begin{bmatrix} 5 & -2 \\ 0 & 0 \end{bmatrix} → rref [ 5 0 − 2 0 ]
x 2 = t x_2 = t x 2 = t
5 x 1 = 2 t 5x_1 = 2t 5 x 1 = 2 t
[ 2 5 t t ] \begin{bmatrix} \frac{2}{5}t \\ t \end{bmatrix} [ 5 2 t t ]
Basis: { [ 2 5 ] } \{ \begin{bmatrix} 2 \\ 5 \end{bmatrix} \} { [ 2 5 ] }
Previous class notes: We verified A = [ 5 1 1 5 ] A = \begin{bmatrix} 5 & 1 \\ 1 & 5 \end{bmatrix} A = [ 5 1 1 5 ] is diagonalizable with S = [ 1 − 1 1 1 ] S = \begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix} S = [ 1 1 − 1 1 ] and B = [ 6 0 0 4 ] B = \begin{bmatrix} 6 & 0 \\ 0 & 4 \end{bmatrix} B = [ 6 0 0 4 ] .
Question: Where did matrix B B B come from?
A: Diagonal entries are eigenvalues for A A A .
f A ( λ ) = λ 2 − tr ( A ) λ + det ( A ) = λ 2 − 10 λ + 24 = ( λ − 6 ) ( λ − 4 ) f_{A} \left( \lambda \right) = \lambda ^{2} - \text{tr}\left( A \right) \lambda + \text{det} \left( A \right) = \lambda ^{2} - 10 \lambda + 24 = \left( \lambda - 6 \right) \left( \lambda -4 \right) f A ( λ ) = λ 2 − tr ( A ) λ + det ( A ) = λ 2 − 10 λ + 24 = ( λ − 6 ) ( λ − 4 ) (Eigenvalues λ = 6 , 4 \lambda = 6, 4 λ = 6 , 4 )
Question: Where di matrix S S S come from?
A: In order, columns are eigenvectors corresponding to eigenvalues.
For λ = 6 : A − 6 I = [ − 1 1 1 − 1 ] \lambda = 6 : A - 6I = \begin{bmatrix} -1 & 1 \\ 1 & -1 \end{bmatrix} λ = 6 : A − 6 I = [ − 1 1 1 − 1 ]
→ rref [ 1 − 1 0 0 ] \overset{\text{rref}}{\to} \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix} → rref [ 1 0 − 1 0 ]
x 2 = t x_2 = t x 2 = t
x 1 = t x_1 = t x 1 = t
[ 1 1 ] \begin{bmatrix} 1 \\ 1 \end{bmatrix} [ 1 1 ] (1st column of S S S )
For λ = 4 : A − 4 I = [ 1 1 1 1 ] \lambda = 4 : A - 4I = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} λ = 4 : A − 4 I = [ 1 1 1 1 ]
→ rref [ 1 1 0 0 ] \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix} → rref [ 1 0 1 0 ]
x 2 = t x_2 = t x 2 = t
x 1 = − t x_1 = -t x 1 = − t
[ − 1 1 ] \begin{bmatrix} -1 \\ 1 \end{bmatrix} [ − 1 1 ] (2nd column of S S S )
Example
The matrix A = [ 4 0 6 0 3 0 6 0 4 ] A = \begin{bmatrix} 4 & 0 & 6 \\ 0 & 3 & 0 \\ 6 & 0 & 4 \end{bmatrix} A = ⎣ ⎡ 4 0 6 0 3 0 6 0 4 ⎦ ⎤ has characteristic polynomial f A ( λ ) = − ( λ − 3 ) ( λ − 10 ) ( λ + 2 ) f_{A} \left( \lambda \right) = - \left( \lambda -3 \right) \left( \lambda - 10 \right) \left( \lambda +2 \right) f A ( λ ) = − ( λ − 3 ) ( λ − 10 ) ( λ + 2 ) . Find a basis for each eigenspace E λ E_{ \lambda } E λ . Diagonalize A A A , if you can.
λ = 3 , 10 , − 2 \lambda = 3, 10, -2 λ = 3 , 10 , − 2
λ = 3 \lambda = 3 λ = 3 :
A − 3 I = [ 1 0 6 0 0 0 6 0 1 ] A - 3I = \begin{bmatrix} 1 & 0 & 6 \\ 0 & 0 & 0 \\ 6 & 0 & 1 \end{bmatrix} A − 3 I = ⎣ ⎡ 1 0 6 0 0 0 6 0 1 ⎦ ⎤
This matrix has rank 2 and nullity is 1.
Basis: { [ 0 1 0 ] } \{ \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 0 1 0 ⎦ ⎤ }
λ = 10 \lambda = 10 λ = 10 :
A − 10 I = [ − 6 0 6 0 − 7 0 6 0 − 6 ] → rref [ 1 0 − 1 0 1 0 0 0 0 ] A - 10 I = \begin{bmatrix} -6 & 0 & 6 \\ 0 & -7 & 0 \\ 6 & 0 & -6 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 0 & -1 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} A − 10 I = ⎣ ⎡ − 6 0 6 0 − 7 0 6 0 − 6 ⎦ ⎤ → rref ⎣ ⎡ 1 0 0 0 1 0 − 1 0 0 ⎦ ⎤
x 3 = t x_3 = t x 3 = t
x 2 = 0 x_2 = 0 x 2 = 0
x 1 = t x_1 = t x 1 = t
Basis: { [ 1 0 1 ] } \{ \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} \} { ⎣ ⎡ 1 0 1 ⎦ ⎤ }
λ = − 2 \lambda = -2 λ = − 2
A + 2 I = [ 6 0 6 0 5 0 6 0 6 ] → rref [ 1 0 1 0 1 0 0 0 0 ] A + 2I = \begin{bmatrix} 6 & 0 & 6 \\ 0 & 5 & 0 \\ 6 & 0 & 6 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} A + 2 I = ⎣ ⎡ 6 0 6 0 5 0 6 0 6 ⎦ ⎤ → rref ⎣ ⎡ 1 0 0 0 1 0 1 0 0 ⎦ ⎤
x 3 = t x_3 = t x 3 = t
x 2 = 0 x_2 = 0 x 2 = 0
x 1 = − t x_1 = -t x 1 = − t
Basis: { [ − 1 0 1 ] } \{ \begin{bmatrix} -1 \\ 0 \\ 1 \end{bmatrix} \} { ⎣ ⎡ − 1 0 1 ⎦ ⎤ }
{ [ 0 1 0 ] , [ 1 0 1 ] , [ − 1 0 1 ] } \{ \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} , \begin{bmatrix} -1 \\ 0 \\ 1 \end{bmatrix} \} { ⎣ ⎡ 0 1 0 ⎦ ⎤ , ⎣ ⎡ 1 0 1 ⎦ ⎤ , ⎣ ⎡ − 1 0 1 ⎦ ⎤ }
Basis for R 3 \mathbb{R}^{3} R 3 and hence an eigenbasis for A A A .
Yes, A A A is diagonalizable.
S = [ 0 1 − 1 1 0 0 0 1 1 ] S = \begin{bmatrix} 0 & 1 & -1 \\ 1 & 0 & 0 \\ 0 & 1 & 1 \end{bmatrix} S = ⎣ ⎡ 0 1 0 1 0 1 − 1 0 1 ⎦ ⎤
B = [ 3 0 0 0 10 0 0 0 − 2 ] B = \begin{bmatrix} 3 & 0 & 0 \\ 0 & 10 & 0 \\ 0 & 0 & -2 \end{bmatrix} B = ⎣ ⎡ 3 0 0 0 10 0 0 0 − 2 ⎦ ⎤
Theorem:
Suppose v ⃗ 1 \vec{v}_1 v 1 , v ⃗ 2 \vec{v}_2 v 2 , …, v ⃗ p \vec{v}_p v p are eigenvectors of an n × n n\times n n × n matrix A A A corresponding to distinct eigenvalues. Then, { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ p } \{ \vec{v}_1, \vec{v}_2, \cdots , \vec{v}_p \} { v 1 , v 2 , ⋯ , v p } is a linearly independent set.
If an n × n n\times n n × n matrix A A A has n n n distinct eigenvalues, then A A A is diagonalizable.
Summary of Digitalization
We diagonalize an n × n n\times n n × n matrix A A A y finding an invertile matrix S S S and a diagonal matrix B B B such that
A = S B S − 1 A = SBS^{-1} A = SB S − 1
Note: Matrix A A A is said to be similar to matrix B B B
A A A is diagonalizable if and only if A A A has n n n linearly independent eigenvectors { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ n } \{\vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_n \} { v 1 , v 2 , ⋯ , v n } .
{ v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ n } \{ \vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_n \} { v 1 , v 2 , ⋯ , v n } is called an eigenbasis for A A A
Matrix S S S has eigenvectors as columns. S = [ ∣ ∣ ∣ v ⃗ 1 v ⃗ 2 ⋯ v ⃗ n ∣ ∣ ∣ ] S = \begin{bmatrix} | & | & & | \\ \vec{v}_1 & \vec{v}_2 & \cdots & \vec{v}_n \\ | & | & & | \end{bmatrix} S = ⎣ ⎡ ∣ v 1 ∣ ∣ v 2 ∣ ⋯ ∣ v n ∣ ⎦ ⎤ . B = [ λ 1 0 ⋯ 0 0 λ 2 ⋯ 0 ⋮ ⋱ 0 0 ⋯ 0 λ n ] B = \begin{bmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & & \ddots & 0 \\ 0 & \cdots & 0 & \lambda _n \end{bmatrix} B = ⎣ ⎡ λ 1 0 ⋮ 0 0 λ 2 ⋯ ⋯ ⋯ ⋱ 0 0 0 0 λ n ⎦ ⎤
We saw 2 × 2 2\times 2 2 × 2 rotation matrices are not diagonalizable as they have no eigenvectors.
Many other matrices are not diagonalizable. Reason: A A A may not have enough linearly independent eigenvectors.
Theorem:
Suppose v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ p \vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_p v 1 , v 2 , ⋯ , v p are eigenvectors of an n × n n\times n n × n matrix A A A corresponding to distinct eigenvalues. Then, { v ⃗ 1 , v ⃗ 2 , ⋯ , v ⃗ p } \{ \vec{v}_1 , \vec{v}_2 , \cdots , \vec{v}_p \} { v 1 , v 2 , ⋯ , v p } is a linearly independent set.
If an n × n n\times n n × n matrix A A A has n n n distinct eigenvalues then A A A is diagonalizable
Example
Find a basis for each eigenspace of A = [ 7 0 3 − 3 2 − 3 − 3 0 1 ] A = \begin{bmatrix} 7 & 0 & 3 \\ -3 & 2 & -3 \\ -3 & 0 & 1 \end{bmatrix} A = ⎣ ⎡ 7 − 3 − 3 0 2 0 3 − 3 1 ⎦ ⎤ . Diagonalize A A A if you can.
We found λ = 2 , 4 , 4 \lambda = 2, 4, 4 λ = 2 , 4 , 4
λ = 2 \lambda = 2 λ = 2 :
A − 2 I A - 2I A − 2 I
[ 5 0 3 − 3 0 − 3 − 3 0 − 1 ] \begin{bmatrix} 5 & 0 & 3 \\ -3 & 0 & -3 \\ -3 & 0 & -1 \end{bmatrix} ⎣ ⎡ 5 − 3 − 3 0 0 0 3 − 3 − 1 ⎦ ⎤
Rank is 2
dim ( E 2 ) = 3 − 2 = 1 \text{dim}\left( E_2 \right) = 3-2 = 1 dim ( E 2 ) = 3 − 2 = 1
Basis to E 2 : { [ 0 1 0 ] } E_2: \{ \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \} E 2 : { ⎣ ⎡ 0 1 0 ⎦ ⎤ }
λ = 4 \lambda = 4 λ = 4 :
A − 4 I A - 4I A − 4 I
[ 3 03 − 3 − 2 − 3 − 3 0 − 3 ] → rref [ 1 0 1 0 1 0 0 0 0 ] \begin{bmatrix} 3 & 0 3 \\ -3 & -2 & -3 \\ -3 & 0 & -3 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} ⎣ ⎡ 3 − 3 − 3 03 − 2 0 − 3 − 3 ⎦ ⎤ → rref ⎣ ⎡ 1 0 0 0 1 0 1 0 0 ⎦ ⎤
Rank is 2
dim ( E 4 ) = 1 \text{dim}\left( E_4 \right) = 1 dim ( E 4 ) = 1
x 3 = t x_3 = t x 3 = t
x 2 = 0 x_2 = 0 x 2 = 0
x 1 = − t x_1 = -t x 1 = − t
Basis for E 4 : { [ − 1 0 1 ] } E_4: \{ \begin{bmatrix} -1 \\ 0 \\ 1 \end{bmatrix} \} E 4 : { ⎣ ⎡ − 1 0 1 ⎦ ⎤ }
A A A is not diagonalizable. We only have 1 linearly independent eigenvector for λ = 4 \lambda =4 λ = 4 .
B = [ 2 0 0 0 4 0 0 0 4 ] B = \begin{bmatrix} 2 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 4 \end{bmatrix} B = ⎣ ⎡ 2 0 0 0 4 0 0 0 4 ⎦ ⎤
S = [ 0 − 1 ? 1 0 ? 0 1 ? ] S = \begin{bmatrix} 0 & -1 & ? \\ 1 & 0 & ? \\ 0 & 1 & ? \end{bmatrix} S = ⎣ ⎡ 0 1 0 − 1 0 1 ? ? ? ⎦ ⎤
No invertible S S S that works.
Definition:
For an n × n n\times n n × n matrix A A A with eigenvalue λ \lambda λ , the geometric multiplicity of λ \lambda λ is the dimension of E λ E _{ \lambda } E λ :
gemu ( λ ) = dim ( E λ ) = dim ( ker ( A − λ I ) ) = n − rank ( A − λ I ) \begin{align*}
\text{gemu}( \lambda ) = \text{dim}(E_{ \lambda }) &= \text{dim}(\text{ker}(A - \lambda I)) \\
&= n - \text{rank}(A - \lambda I)
\end{align*} gemu ( λ ) = dim ( E λ ) = dim ( ker ( A − λ I )) = n − rank ( A − λ I )
Last example: almu ( 2 ) = 1 = geom ( 2 ) \text{almu}(2) = 1 = \text{geom}(2) almu ( 2 ) = 1 = geom ( 2 )
almu ( 4 ) = 2 \text{almu}(4) = 2 almu ( 4 ) = 2
gemu ( 4 ) = 1 \text{gemu}(4) = 1 gemu ( 4 ) = 1
Theorem:
An n × n n\times n n × n matrix A A A is diagonalizable if and only if the geometric multiplicities of eigenvalues add to n n n .
Exercise : Show A = [ 2 1 0 − 1 4 0 5 3 3 ] A = \begin{bmatrix} 2 & 1 & 0 \\ -1 & 4 & 0 \\ 5 & 3 & 3 \end{bmatrix} A = ⎣ ⎡ 2 − 1 5 1 4 3 0 0 3 ⎦ ⎤ with λ = 3 , 3 , 3 \lambda = 3, 3, 3 λ = 3 , 3 , 3 is not diagonalizable.
A − 3 I = [ − 1 1 0 − 1 1 0 5 3 0 ] A - 3I = \begin{bmatrix} -1 & 1 & 0 \\ -1 & 1 & 0 \\ 5 & 3 & 0 \end{bmatrix} A − 3 I = ⎣ ⎡ − 1 − 1 5 1 1 3 0 0 0 ⎦ ⎤
rank ( A − 3 I ) = 2 \text{rank}\left( A - 3I \right) = 2 rank ( A − 3 I ) = 2
gemu ( 3 ) = 3 − 2 = 1 < 3 \text{gemu}(3) = 3-2 = 1 < 3 gemu ( 3 ) = 3 − 2 = 1 < 3
We only have 1 linearly independent eigenvector.
Example
The matrix A = [ 4 − 3 0 2 − 1 0 1 − 1 1 ] A = \begin{bmatrix} 4 & -3 & 0 \\ 2 & -1 & 0 \\ 1 & -1 & 1 \end{bmatrix} A = ⎣ ⎡ 4 2 1 − 3 − 1 − 1 0 0 1 ⎦ ⎤ has characteristic polynomial f A ( λ ) = ( 1 − λ ) 2 ( 2 − λ ) f_{A} ( \lambda ) = (1 - \lambda )^2 (2- \lambda ) f A ( λ ) = ( 1 − λ ) 2 ( 2 − λ ) . Diagonalize A A A if you can.
λ = 1 \lambda = 1 λ = 1 :
A − I A - I A − I
[ 3 − 3 0 2 − 2 0 1 − 1 0 ] → rref [ 1 − 1 0 0 0 0 0 0 0 ] \begin{bmatrix} 3 & -3 & 0 \\ 2 & -2 & 0 \\ 1 & -1 & 0 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & -1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} ⎣ ⎡ 3 2 1 − 3 − 2 − 1 0 0 0 ⎦ ⎤ → rref ⎣ ⎡ 1 0 0 − 1 0 0 0 0 0 ⎦ ⎤
Rank is 1
dim ( E 1 ) = 2 = almu ( 1 ) \text{dim}\left( E_1 \right) = 2 = \text{almu}(1) dim ( E 1 ) = 2 = almu ( 1 )
x 1 = t x_1 = t x 1 = t
x 2 = t x_2 = t x 2 = t
x 3 = r x_3 = r x 3 = r
Basis for E 1 = { [ 1 1 0 ] , [ 0 0 1 ] } E_1 = \{ \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \} E 1 = { ⎣ ⎡ 1 1 0 ⎦ ⎤ , ⎣ ⎡ 0 0 1 ⎦ ⎤ }
λ = 2 \lambda = 2 λ = 2 :
A − 2 I A - 2I A − 2 I
[ 2 − 3 0 2 − 3 0 1 − 1 − 1 ] → [ 1 − 1 − 1 2 − 3 0 0 0 0 ] \begin{bmatrix} 2 & -3 & 0 \\ 2 & -3 & 0 \\ 1 & -1 & -1 \end{bmatrix} \to \begin{bmatrix} 1 & -1 & -1 \\ 2 & -3 & 0 \\ 0 & 0 & 0 \end{bmatrix} ⎣ ⎡ 2 2 1 − 3 − 3 − 1 0 0 − 1 ⎦ ⎤ → ⎣ ⎡ 1 2 0 − 1 − 3 0 − 1 0 0 ⎦ ⎤
→ [ 1 − 1 − 1 0 − 1 2 0 0 0 ] → [ 1 0 − 3 0 1 − 2 0 0 0 ] \to \begin{bmatrix} 1 & -1 & -1 \\ 0 & -1 & 2 \\ 0 & 0 & 0 \end{bmatrix} \to \begin{bmatrix} 1 & 0 & -3 \\ 0 & 1 & -2 \\ 0 & 0 & 0 \end{bmatrix} → ⎣ ⎡ 1 0 0 − 1 − 1 0 − 1 2 0 ⎦ ⎤ → ⎣ ⎡ 1 0 0 0 1 0 − 3 − 2 0 ⎦ ⎤
x 3 = t x_3 = t x 3 = t
x 2 = 2 t x_2 = 2t x 2 = 2 t
x 1 = 3 t x_1 = 3t x 1 = 3 t
Basis for E 2 = { [ 3 2 1 ] } E_2 = \{ \begin{bmatrix} 3 \\ 2 \\ 1 \end{bmatrix} \} E 2 = { ⎣ ⎡ 3 2 1 ⎦ ⎤ }
Yes! It’s diagonalizable
B = [ 1 0 0 0 1 0 0 0 2 ] B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{bmatrix} B = ⎣ ⎡ 1 0 0 0 1 0 0 0 2 ⎦ ⎤
S = [ 1 0 3 1 0 2 0 1 1 ] S = \begin{bmatrix} 1 & 0 & 3 \\ 1 & 0 & 2 \\ 0 & 1 & 1 \end{bmatrix} S = ⎣ ⎡ 1 1 0 0 0 1 3 2 1 ⎦ ⎤
Comment: if λ \lambda λ is an eigenvalue for A A A then
1 ≤ gemu ( λ ) ≤ almu ( λ ) 1 \le \text{gemu}( \lambda ) \le \text{almu}( \lambda ) 1 ≤ gemu ( λ ) ≤ almu ( λ )
For any n ≥ 1 n\ge 1 n ≥ 1 , there exists a non-diagonalizable n × n n\times n n × n matrix.
Proof for n = 5 n =5 n = 5
Let A = [ 2 1 0 0 0 0 2 1 0 0 0 0 2 1 0 0 0 0 2 1 0 0 0 0 2 ] A = \begin{bmatrix} 2 & 1 & 0 & 0 & 0 \\ 0 & 2 & 1 & 0 & 0 \\ 0 & 0 & 2 & 1 & 0 \\ 0 & 0 & 0 & 2 & 1 \\ 0 & 0 & 0 & 0 & 2 \end{bmatrix} A = ⎣ ⎡ 2 0 0 0 0 1 2 0 0 0 0 1 2 0 0 0 0 1 2 0 0 0 0 1 2 ⎦ ⎤
Note λ = 2 \lambda = 2 λ = 2 only eigenvalue almu ( 2 ) = 5 \text{almu}(2) = 5 almu ( 2 ) = 5
det ( A − λ I ) = ( 2 − λ ) 5 \text{det}\left( A - \lambda I \right) = \left( 2- \lambda \right) ^{5} det ( A − λ I ) = ( 2 − λ ) 5
Has rank 4 dim ( E 2 ) = 1 < 5 \text{dim}(E_2) = 1<5 dim ( E 2 ) = 1 < 5
A − 2 I = [ 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ] A - 2I = \begin{bmatrix} 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 \end{bmatrix} A − 2 I = ⎣ ⎡ 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 ⎦ ⎤
8.1 Symmetric Matrices 8.1 Symmetric Matrices
Two “fantastic” things:
Orthonormal bases (The easiest bases to work with)
Diagonal matrices (The easiest matrices to work with)
Question: Which n × n n\times n n × n matrices have an orthonormal eigenbasis?
{ v ⃗ 1 , ⋯ , v ⃗ n } \{ \vec{v}_1 , \cdots , \vec{v}_n \} { v 1 , ⋯ , v n } eigenvectors for A A A and are orthonormal.
Equivalently, for which n × n n\times n n × n matrices A A A can we find
An orthogonal matrix S S S and
diagonal matrix B B B with A = S B S − 1 A = SBS^{-1} A = SB S − 1
Recall: An n × n n\times n n × n matrix S S S is orthogonal if and only if S − 1 = S T S^{-1} = S^{T} S − 1 = S T
A A A has an orthonormal eigenbasis if and only if A = S B S T A = SBS^{T} A = SB S T where S S S is an orthogonal matrix and B B B is a diagonal matrix.
Definition : Matrix A A A is said to be orthogonally diagonalizable.
Answer: (Spectra Theorem) An n × n n\times n n × n matrix A A A is orthogonally diagonalizable if and only if A A A is symmetric.
Check: If A = S B S T A = SBS^{T} A = SB S T then A T = ( S B S T ) T = ( S T ) T B T S T = S B S T = A A^{T} = \left( SBS^{T} \right) ^{T} = \left( S^{T} \right) ^{T} B^{T}S^{T} = SBS^{T} = A A T = ( SB S T ) T = ( S T ) T B T S T = SB S T = A
Properties of Symmetric Matrices:
All of this is part of Spectral Theorem
A symmetric n × n n\times n n × n matrix has n n n (real) eigenvalues counted with geometric multiplicities. Any eigenvalue for A A A satisfies almu ( λ ) = geom ( λ ) \text{almu}\left( \lambda \right) = \text{geom} \left( \lambda \right) almu ( λ ) = geom ( λ )
Any 2 eigenvectors corresponding to different eigenvalues of a symmetric matrix are perpendicular. (This is not true if A A A is not symmetric)
Example
Let A = [ 2 3 3 2 ] A = \begin{bmatrix} 2 & 3 \\ 3 & 2 \end{bmatrix} A = [ 2 3 3 2 ] . Orthogonally diagonalize A A A .
f A ( λ ) = λ 2 − tr ( A ) λ + det ( A ) f_{A}\left( \lambda \right) = \lambda ^{2} - \text{tr}\left( A \right) \lambda + \text{det}\left( A \right) f A ( λ ) = λ 2 − tr ( A ) λ + det ( A )
f A ( λ ) = λ 2 − 4 λ − 5 = ( λ − 5 ) ( λ + 1 ) f_{A}\left( \lambda \right) = \lambda ^{2} - 4 \lambda -5 = \left( \lambda -5 \right) \left( \lambda +1 \right) f A ( λ ) = λ 2 − 4 λ − 5 = ( λ − 5 ) ( λ + 1 ) . λ = 5 , − 1 \lambda = 5, -1 λ = 5 , − 1
λ = 5 \lambda =5 λ = 5 :
A − 5 I A - 5I A − 5 I
[ − 3 3 3 − 3 ] → rref [ 1 − 1 0 0 ] \begin{bmatrix} -3 & 3 \\ 3 & -3 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix} [ − 3 3 3 − 3 ] → rref [ 1 0 − 1 0 ]
x 2 = t x_2 = t x 2 = t
x 1 = t x_1 = t x 1 = t
Basis for E 5 : { [ 1 1 ] } E_5 : \{ \begin{bmatrix} 1 \\ 1 \end{bmatrix} \} E 5 : { [ 1 1 ] }
λ = − 1 \lambda = -1 λ = − 1
A = I A = I A = I
[ 3 3 3 3 ] → rref [ 1 1 0 0 ] \begin{bmatrix} 3 & 3 \\ 3 & 3 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix} [ 3 3 3 3 ] → rref [ 1 0 1 0 ]
x 2 = t x_2 = t x 2 = t
x 1 = − t x_1 = -t x 1 = − t
Basis for E − 1 : { [ − 1 1 ] } E_{-1} : \{ \begin{bmatrix} -1 \\ 1 \end{bmatrix} \} E − 1 : { [ − 1 1 ] }
B = [ 5 0 0 − 1 ] B = \begin{bmatrix} 5 & 0 \\ 0 & -1 \end{bmatrix} B = [ 5 0 0 − 1 ]
S = [ 1 2 − 1 2 1 2 1 2 ] S = \begin{bmatrix} \frac{1}{\sqrt{2} } & -\frac{1}{\sqrt{2} } \\\ \frac{1}{\sqrt{2} } & \frac{1}{\sqrt{2} } \end{bmatrix} S = [ 2 1 2 1 − 2 1 2 1 ]
5 is orthogonal
In the next example, we will use that if A A A is an orthogonal matrix, then the only possible eigenvalues are λ = 1 \lambda = 1 λ = 1 and λ = − 1 \lambda = -1 λ = − 1
Reason:
Orthogonal matrix A A A : ∣ ∣ A v ⃗ ∣ ∣ = ∣ ∣ v ⃗ ∣ ∣ \mid \mid A \vec{v} \mid \mid = \mid \mid \vec{v} \mid \mid ∣∣ A v ∣∣=∣∣ v ∣∣ for all v ⃗ \vec{v} v in R n \mathbb{R}^{n} R n . If λ \lambda λ an eigenvalue v ⃗ ≠ 0 ⃗ \vec{v} \neq \vec{0} v = 0 A v ⃗ = λ v ⃗ A \vec{v} = \lambda \vec{v} A v = λ v .
∣ λ ∣ ∣ ∣ v ⃗ ∣ ∣ = ∣ ∣ λ v ⃗ ∣ ∣ = ∣ ∣ v ⃗ ∣ ∣ → ∣ λ ∣ = 1 \mid \lambda \mid \mid \mid \vec{v} \mid \mid = \mid \mid \lambda \vec{v} \mid \mid = \mid \mid \vec{v} \mid \mid \to \mid \lambda \mid = 1 ∣ λ ∣∣∣ v ∣∣=∣∣ λ v ∣∣=∣∣ v ∣∣→∣ λ ∣= 1
λ = 1 , − 1 \lambda = 1, -1 λ = 1 , − 1
Example
Let A = [ 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 ] A = \begin{bmatrix} 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \end{bmatrix} A = ⎣ ⎡ 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 ⎦ ⎤ . Find an orthogonal matrix S S S and a diagonal matrix B B B with A = S B S T A = SBS^{T} A = SB S T . Hint: A A A is orthogonal what can eigenvalues be? Only possibilities are λ = 1 , − 1 \lambda = 1, -1 λ = 1 , − 1 .
λ = 1 \lambda = 1 λ = 1 :
A − I A - I A − I
[ − 1 0 0 1 0 − 1 1 0 0 1 − 1 0 1 0 0 − 1 ] → rref [ 1 0 0 − 1 0 1 − 1 0 0 0 0 0 0 0 0 0 ] \begin{bmatrix} -1 & 0 & 0 & 1 \\ 0 & -1 & 1 & 0 \\ 0 & 1 & -1 & 0 \\ 1 & 0 & 0 & -1 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 0 & 0 & -1 \\ 0 & 1 & -1 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix} ⎣ ⎡ − 1 0 0 1 0 − 1 1 0 0 1 − 1 0 1 0 0 − 1 ⎦ ⎤ → rref ⎣ ⎡ 1 0 0 0 0 1 0 0 0 − 1 0 0 − 1 0 0 0 ⎦ ⎤
x 4 = t x_4 = t x 4 = t
x 3 = r x_3 = r x 3 = r
x 1 = t x_1 = t x 1 = t
x 2 = r x_2 = r x 2 = r
[ t r r t ] = t [ 1 0 0 1 ] + r [ 0 1 1 0 ] \begin{bmatrix} t \\ r \\ r \\ t \end{bmatrix} = t \begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix} + r \begin{bmatrix} 0 \\ 1 \\ 1 \\ 0 \end{bmatrix} ⎣ ⎡ t r r t ⎦ ⎤ = t ⎣ ⎡ 1 0 0 1 ⎦ ⎤ + r ⎣ ⎡ 0 1 1 0 ⎦ ⎤
Basis for E 1 = { [ 1 0 0 1 ] , [ 0 1 1 0 ] } E_{1} = \{ \begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 1 \\ 0 \end{bmatrix} \} E 1 = { ⎣ ⎡ 1 0 0 1 ⎦ ⎤ , ⎣ ⎡ 0 1 1 0 ⎦ ⎤ }
λ = − 1 \lambda = -1 λ = − 1
A + I A + I A + I
[ 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 ] → rref [ 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 ] \begin{bmatrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 \\ 1 & 0 & 0 & 1 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix} ⎣ ⎡ 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 ⎦ ⎤ → rref ⎣ ⎡ 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 ⎦ ⎤
x 4 = t x_4 = t x 4 = t
x 3 = r x_3 = r x 3 = r
x 1 = − t x_1 = -t x 1 = − t
x 2 = − r x_2 = -r x 2 = − r
[ − t − r r t ] = t [ − 1 0 0 1 ] + r [ 0 − 1 1 0 ] \begin{bmatrix} -t \\ -r \\ r \\ t \end{bmatrix} = t \begin{bmatrix} -1 \\ 0 \\ 0 \\ 1 \end{bmatrix} + r \begin{bmatrix} 0 \\ -1 \\ 1 \\ 0 \end{bmatrix} ⎣ ⎡ − t − r r t ⎦ ⎤ = t ⎣ ⎡ − 1 0 0 1 ⎦ ⎤ + r ⎣ ⎡ 0 − 1 1 0 ⎦ ⎤
Basis for E − 1 = { [ − 1 0 0 1 ] , [ 0 − 1 1 0 ] } E_{-1} = \{ \begin{bmatrix} -1 \\ 0 \\ 0 \\ 1 \end{bmatrix} , \begin{bmatrix} 0 \\ -1 \\ 1 \\ 0 \end{bmatrix} \} E − 1 = { ⎣ ⎡ − 1 0 0 1 ⎦ ⎤ , ⎣ ⎡ 0 − 1 1 0 ⎦ ⎤ }
∣ ∣ v ⃗ i ∣ ∣ = 1 2 + 0 + 0 + 1 2 = 2 \mid \mid \vec{v}_i \mid \mid = \sqrt{1^{2} + 0 + 0 + 1^{2}} = \sqrt{2} ∣∣ v i ∣∣= 1 2 + 0 + 0 + 1 2 = 2
B = [ 1 0 0 0 0 1 0 0 0 0 − 1 0 0 0 0 − 1 ] B = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & -1 \end{bmatrix} B = ⎣ ⎡ 1 0 0 0 0 1 0 0 0 0 − 1 0 0 0 0 − 1 ⎦ ⎤
S = [ 1 2 0 − 1 2 0 0 1 2 0 − 1 2 0 1 2 0 1 2 1 2 0 1 2 0 ] S = \begin{bmatrix} \frac{1}{\sqrt{2} } & 0 & -\frac{1}{\sqrt{2} } & 0 \\ 0 & \frac{1}{\sqrt{2} } & 0 & -\frac{1}{\sqrt{2} } \\ 0 & \frac{1}{\sqrt{2} } & 0 & \frac{1}{\sqrt{2} } \\ \frac{1}{\sqrt{2} } & 0 & \frac{1}{\sqrt{2} } & 0\end{bmatrix} S = ⎣ ⎡ 2 1 0 0 2 1 0 2 1 2 1 0 − 2 1 0 0 2 1 0 − 2 1 2 1 0 ⎦ ⎤
Example
The matrix A = [ 2 2 2 2 0 0 2 0 0 ] A = \begin{bmatrix} 2 & 2 & 2 \\ 2 & 0 & 0 \\ 2 & 0 & 0 \end{bmatrix} A = ⎣ ⎡ 2 2 2 2 0 0 2 0 0 ⎦ ⎤ has characteristic polynomial f A ( λ ) = − λ ( λ − 4 ) ( λ + 2 ) f_{A} \left( \lambda \right) = - \lambda \left( \lambda - 4 \right) \left( \lambda +2 \right) f A ( λ ) = − λ ( λ − 4 ) ( λ + 2 ) . Orthogonally diagonalize A A A .
λ = 0 \lambda = 0 λ = 0
A − 0 I A - 0I A − 0 I
[ 2 2 2 2 0 0 2 0 0 ] → rref [ 1 0 0 0 1 1 0 0 0 ] \begin{bmatrix} 2 & 2 & 2 \\ 2 & 0 & 0 \\ 2 & 0 & 0 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix} ⎣ ⎡ 2 2 2 2 0 0 2 0 0 ⎦ ⎤ → rref ⎣ ⎡ 1 0 0 0 1 0 0 1 0 ⎦ ⎤
x 3 = t x_3 = t x 3 = t
x 2 = − t x_2 = -t x 2 = − t
x 1 = 0 x_1 = 0 x 1 = 0
Basis for E 0 : { [ 0 − 1 1 ] } E_{0} : \{ \begin{bmatrix} 0 \\ -1 \\ 1 \end{bmatrix} \} E 0 : { ⎣ ⎡ 0 − 1 1 ⎦ ⎤ }
λ = 4 \lambda = 4 λ = 4
A − 4 I A - 4I A − 4 I
[ − 2 2 2 2 − 4 0 2 0 − 4 ] → [ 1 0 − 2 1 − 2 0 − 1 1 1 ] \begin{bmatrix} -2 & 2 & 2 \\ 2 & -4 & 0 \\ 2 & 0 & -4 \end{bmatrix} \to \begin{bmatrix} 1 & 0 & -2 \\ 1 & -2 & 0 \\ -1 & 1 & 1 \end{bmatrix} ⎣ ⎡ − 2 2 2 2 − 4 0 2 0 − 4 ⎦ ⎤ → ⎣ ⎡ 1 1 − 1 0 − 2 1 − 2 0 1 ⎦ ⎤
→ [ 1 0 − 2 0 − 2 2 0 1 − 1 ] → [ 1 0 − 2 0 1 − 1 0 0 0 ] \to
\begin{bmatrix} 1 & 0 & -2 \\ 0 & -2 & 2 \\ 0 & 1 & -1 \end{bmatrix} \to \begin{bmatrix} 1 & 0 & -2 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{bmatrix} → ⎣ ⎡ 1 0 0 0 − 2 1 − 2 2 − 1 ⎦ ⎤ → ⎣ ⎡ 1 0 0 0 1 0 − 2 − 1 0 ⎦ ⎤
x 3 = t x_3 = t x 3 = t
x 2 = t x_2 = t x 2 = t
x 1 = 2 t x_1 = 2t x 1 = 2 t
Basis for E 4 : { [ 2 1 1 ] } E_{4} : \{ \begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix} \} E 4 : { ⎣ ⎡ 2 1 1 ⎦ ⎤ }
λ = − 2 : \lambda = -2: λ = − 2 :
A + 2 I A + 2I A + 2 I
[ 4 2 2 2 2 0 2 0 2 ] → [ 1 0 1 1 1 0 2 1 1 ] \begin{bmatrix} 4 & 2 & 2 \\ 2 & 2 & 0 \\2 & 0 & 2 \end{bmatrix} \to \begin{bmatrix} 1 & 0 & 1 \\ 1 & 1 & 0 \\ 2 & 1 & 1 \end{bmatrix} ⎣ ⎡ 4 2 2 2 2 0 2 0 2 ⎦ ⎤ → ⎣ ⎡ 1 1 2 0 1 1 1 0 1 ⎦ ⎤
→ [ 1 0 1 0 1 − 1 0 1 − 1 ] → [ 1 0 1 0 1 − 1 0 0 0 ] \to \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & -1 \\ 0 & 1 & -1 \end{bmatrix} \to \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{bmatrix} → ⎣ ⎡ 1 0 0 0 1 1 1 − 1 − 1 ⎦ ⎤ → ⎣ ⎡ 1 0 0 0 1 0 1 − 1 0 ⎦ ⎤
x 3 = t x_3 = t x 3 = t
x 2 = t x_2 = t x 2 = t
x 1 = − t x_1 = -t x 1 = − t
Basis for E − 2 : { [ − 1 1 1 ] } E_{-2} : \{ \begin{bmatrix} -1 \\ 1 \\ 1 \end{bmatrix} \} E − 2 : { ⎣ ⎡ − 1 1 1 ⎦ ⎤ }
{ [ 0 − 1 1 ] , [ 2 1 1 ] , [ − 1 1 1 ] } \{ \begin{bmatrix} 0 \\ -1 \\ 1 \end{bmatrix} , \begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix} , \begin{bmatrix} -1 \\ 1 \\ 1 \end{bmatrix} \} { ⎣ ⎡ 0 − 1 1 ⎦ ⎤ , ⎣ ⎡ 2 1 1 ⎦ ⎤ , ⎣ ⎡ − 1 1 1 ⎦ ⎤ }
Eigenbasis
∣ ∣ v ⃗ 1 ∣ ∣ = 1 + 1 + 0 = 2 \mid \mid \vec{v}_1 \mid \mid = \sqrt{1+1+0} = \sqrt{2} ∣∣ v 1 ∣∣= 1 + 1 + 0 = 2
∣ ∣ v ⃗ 2 ∣ ∣ = 4 + 1 + 1 = 6 \mid \mid \vec{v}_2 \mid \mid = \sqrt{4 + 1 + 1} = \sqrt{6} ∣∣ v 2 ∣∣= 4 + 1 + 1 = 6
∣ ∣ v ⃗ 3 ∣ ∣ = 1 + 1 + 1 = 3 \mid \mid \vec{v}_3 \mid \mid = \sqrt{1+1+1} = \sqrt{3} ∣∣ v 3 ∣∣= 1 + 1 + 1 = 3
S = [ 0 2 6 − 1 3 − 1 2 1 6 1 3 1 2 1 6 1 3 ] S = \begin{bmatrix} 0 & \frac{2}{\sqrt{6} } & -\frac{1}{\sqrt{3} } \\ -\frac{1}{\sqrt{2} } & \frac{1}{\sqrt{6} } & \frac{1}{\sqrt{3} } \\ \frac{1}{\sqrt{2} } & \frac{1}{\sqrt{6} } & \frac{1}{\sqrt{3} } \end{bmatrix} S = ⎣ ⎡ 0 − 2 1 2 1 6 2 6 1 6 1 − 3 1 3 1 3 1 ⎦ ⎤
B = [ 0 0 0 0 4 0 0 0 − 2 ] B = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & -2 \end{bmatrix} B = ⎣ ⎡ 0 0 0 0 4 0 0 0 − 2 ⎦ ⎤
Notes:
Generally, for a symmetric matrix A A A , if you have a repeated eigenvalue λ \lambda λ i.e. almu ( λ ) > 1 \text{almu}\left( \lambda \right) > 1 almu ( λ ) > 1 , one would perform Gram Schmidt on basis for E λ E_{ \lambda } E λ .
Two different concepts: in terms of chapter 7.
Diagonalizable : n n n linearly independent eigenvectors
Invertible : 0 is not an eigenvalue.
Exercise Suppose A A A is a 3 × 3 3\times 3 3 × 3 matrix with eigenbasis { [ 3 0 4 ] , [ − 8 0 6 ] , [ 0 1 0 ] } \{ \begin{bmatrix} 3 \\ 0 \\ 4 \end{bmatrix} , \begin{bmatrix} -8 \\ 0 \\ 6 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \} { ⎣ ⎡ 3 0 4 ⎦ ⎤ , ⎣ ⎡ − 8 0 6 ⎦ ⎤ , ⎣ ⎡ 0 1 0 ⎦ ⎤ } .
Is A A A diagonalizable? Yes
Is A A A symmetric? Yes (Can normalize each vector to get orthonormal eigenbasis)
Is A A A invertible? Not enough information
Diagonalization
Example
Suppose A A A has characteristic polynomial f A ( λ ) = λ 2 ( 1 − λ ) ( 2 − λ ) 3 f_{A}\left( \lambda \right) = \lambda ^{2} \left( 1- \lambda \right) \left( 2 - \lambda \right) ^{3} f A ( λ ) = λ 2 ( 1 − λ ) ( 2 − λ ) 3 . Note: A A A is 6 × 6 6\times 6 6 × 6
1) What are possible dimensions of the eigenspaces of A A A ?
E 0 E_{0} E 0 : dim 1 or 2 almu ( 0 ) = 2 \text{almu}(0) = 2 almu ( 0 ) = 2
E 1 E_{1} E 1 : dim 1 almu ( 1 ) = 1 \text{almu}(1) = 1 almu ( 1 ) = 1
E 2 E_{2} E 2 : dim 1, 2, 3 almu ( 2 ) = 3 \text{almu}(2) = 3 almu ( 2 ) = 3
2) What is A A A diagonalizable?
When dim ( E 0 ) = 2 \text{dim}(E_{0}) = 2 dim ( E 0 ) = 2 and dim ( E 2 ) = 3 \text{dim}(E_{2}) = 3 dim ( E 2 ) = 3 .
Example
The matrix A = [ 2 0 2 0 4 2 2 2 3 ] A = \begin{bmatrix} 2 & 0 & 2 \\ 0 & 4 & 2 \\ 2 & 2 & 3 \end{bmatrix} A = ⎣ ⎡ 2 0 2 0 4 2 2 2 3 ⎦ ⎤ has eigenvectors v ⃗ 1 = [ 1 2 2 ] \vec{v}_1 = \begin{bmatrix} 1 \\ 2 \\ 2 \end{bmatrix} v 1 = ⎣ ⎡ 1 2 2 ⎦ ⎤ , v ⃗ 2 = [ 2 − 2 1 ] \vec{v}_2 = \begin{bmatrix} 2 \\ -2 \\ 1 \end{bmatrix} v 2 = ⎣ ⎡ 2 − 2 1 ⎦ ⎤ , and v ⃗ 3 = [ 2 1 − 2 ] \vec{v}_3 = \begin{bmatrix} 2 \\ 1 \\ -2 \end{bmatrix} v 3 = ⎣ ⎡ 2 1 − 2 ⎦ ⎤ .
A A A is symmetric. We will orthogonally diagonalize A A A .
[ 2 0 2 0 4 2 2 2 3 ] [ 1 2 2 ] = [ 6 12 12 ] = 6 [ 1 2 2 ] \begin{bmatrix} 2 & 0 & 2 \\ 0 & 4 & 2 \\ 2 & 2 & 3 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \\ 2 \end{bmatrix} = \begin{bmatrix} 6 \\ 12 \\ 12 \end{bmatrix} = 6 \begin{bmatrix} 1 \\ 2 \\ 2 \end{bmatrix} ⎣ ⎡ 2 0 2 0 4 2 2 2 3 ⎦ ⎤ ⎣ ⎡ 1 2 2 ⎦ ⎤ = ⎣ ⎡ 6 12 12 ⎦ ⎤ = 6 ⎣ ⎡ 1 2 2 ⎦ ⎤
[ 2 0 2 0 4 2 2 2 3 ] [ 2 − 2 1 ] = [ 6 − 6 3 ] = 3 [ 2 − 2 1 ] \begin{bmatrix} 2 & 0 & 2 \\ 0 & 4 & 2 \\ 2 & 2 & 3 \end{bmatrix} \begin{bmatrix} 2 \\ -2 \\ 1 \end{bmatrix} = \begin{bmatrix} 6 \\ -6 \\ 3 \end{bmatrix} = 3 \begin{bmatrix} 2 \\ -2 \\ 1 \end{bmatrix} ⎣ ⎡ 2 0 2 0 4 2 2 2 3 ⎦ ⎤ ⎣ ⎡ 2 − 2 1 ⎦ ⎤ = ⎣ ⎡ 6 − 6 3 ⎦ ⎤ = 3 ⎣ ⎡ 2 − 2 1 ⎦ ⎤
[ 2 0 2 0 4 2 2 2 3 ] [ 2 1 − 2 ] = [ 0 0 0 ] = 0 [ 2 1 − 2 ] \begin{bmatrix} 2 & 0 & 2 \\ 0 & 4 & 2 \\ 2 & 2 & 3 \end{bmatrix} \begin{bmatrix} 2 \\ 1 \\ -2 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} = 0 \begin{bmatrix} 2 \\ 1 \\ -2 \end{bmatrix} ⎣ ⎡ 2 0 2 0 4 2 2 2 3 ⎦ ⎤ ⎣ ⎡ 2 1 − 2 ⎦ ⎤ = ⎣ ⎡ 0 0 0 ⎦ ⎤ = 0 ⎣ ⎡ 2 1 − 2 ⎦ ⎤
B = [ 6 0 0 0 3 0 0 0 0 ] B = \begin{bmatrix} 6 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 0 \end{bmatrix} B = ⎣ ⎡ 6 0 0 0 3 0 0 0 0 ⎦ ⎤
∣ ∣ v ⃗ i ∣ ∣ = 4 + 4 + 1 = 3 \mid \mid \vec{v}_i \mid \mid = \sqrt{4 + 4 + 1} = 3 ∣∣ v i ∣∣= 4 + 4 + 1 = 3
S = [ 1 3 2 3 2 3 2 3 − 2 3 1 3 2 3 1 3 − 2 3 ] S = \begin{bmatrix} \frac{1}{3} & \frac{2}{3} & \frac{2}{3} \\ \frac{2}{3} & -\frac{2}{3} & \frac{1}{3} \\ \frac{2}{3} & \frac{1}{3} & -\frac{2}{3} \end{bmatrix} S = ⎣ ⎡ 3 1 3 2 3 2 3 2 − 3 2 3 1 3 2 3 1 − 3 2 ⎦ ⎤
Note: S S S is orthogonal
Example
Let A = [ 2 0 − 3 1 3 3 0 0 3 ] A = \begin{bmatrix} 2 & 0 & -3 \\ 1 & 3 & 3 \\ 0 & 0 & 3\end{bmatrix} A = ⎣ ⎡ 2 1 0 0 3 0 − 3 3 3 ⎦ ⎤ . Find eigenvalues and a basis for each eigenspace. Diagonalize A A A if you can.
∣ A − λ I ∣ = ∣ 2 − λ 0 − 3 1 3 − λ 3 0 0 3 − λ ∣ = ( − 1 ) 3 + 3 ( 3 − λ ) ∣ 2 − λ 0 1 3 − λ ∣ = ( 3 − λ ) 2 ( 2 − λ ) \mid A - \lambda I \mid = \begin{vmatrix} 2- \lambda & 0 & -3 \\ 1 & 3- \lambda & 3 \\ 0 & 0 & 3- \lambda \end{vmatrix} = (-1)^{3+3} (3 - \lambda ) \begin{vmatrix} 2- \lambda & 0 \\ 1 & 3- \lambda \end{vmatrix} = \left( 3- \lambda \right) ^{2} \left( 2 - \lambda \right) ∣ A − λ I ∣= ∣ ∣ 2 − λ 1 0 0 3 − λ 0 − 3 3 3 − λ ∣ ∣ = ( − 1 ) 3 + 3 ( 3 − λ ) ∣ ∣ 2 − λ 1 0 3 − λ ∣ ∣ = ( 3 − λ ) 2 ( 2 − λ ) .
λ = 3 , 3 , 2 \lambda = 3, 3, 2 λ = 3 , 3 , 2
λ = 3 \lambda = 3 λ = 3
A − 3 I A - 3I A − 3 I
[ − 1 0 − 3 1 0 3 0 0 0 ] → rref [ 1 0 3 0 0 0 0 0 0 ] \begin{bmatrix} -1 & 0 & -3 \\ 1 & 0 & 3 \\ 0 & 0 & 0 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 0 & 3 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} ⎣ ⎡ − 1 1 0 0 0 0 − 3 3 0 ⎦ ⎤ → rref ⎣ ⎡ 1 0 0 0 0 0 3 0 0 ⎦ ⎤
x 3 = t x_3 = t x 3 = t
x 2 = r x_2 = r x 2 = r
x 1 = − 3 r x_1 = -3r x 1 = − 3 r
[ − 3 t r t ] = t [ − 3 0 1 ] + r [ 0 1 0 ] \begin{bmatrix} -3t \\ r \\ t \end{bmatrix} = t \begin{bmatrix} -3 \\ 0 \\ 1 \end{bmatrix} + r \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} ⎣ ⎡ − 3 t r t ⎦ ⎤ = t ⎣ ⎡ − 3 0 1 ⎦ ⎤ + r ⎣ ⎡ 0 1 0 ⎦ ⎤
Basis for E 3 : { [ − 3 0 1 ] , [ 0 1 0 ] } E_3 : \{ \begin{bmatrix} -3 \\ 0 \\ 1 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \} E 3 : { ⎣ ⎡ − 3 0 1 ⎦ ⎤ , ⎣ ⎡ 0 1 0 ⎦ ⎤ }
λ = 2 \lambda = 2 λ = 2
A − 2 I A - 2 I A − 2 I
[ 0 0 − 3 1 1 3 0 0 1 ] → rref [ 1 1 0 0 0 1 0 0 0 ] \begin{bmatrix} 0 & 0 & -3 \\ 1 & 1 & 3 \\ 0 & 0 & 1 \end{bmatrix} \overset{\text{rref}}{\to} \begin{bmatrix} 1 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix} ⎣ ⎡ 0 1 0 0 1 0 − 3 3 1 ⎦ ⎤ → rref ⎣ ⎡ 1 0 0 1 0 0 0 1 0 ⎦ ⎤
x 3 = 0 x_3 = 0 x 3 = 0
x 2 = t x_2 = t x 2 = t
x 1 = − t x_1 = -t x 1 = − t
Basis for E 2 : { [ − 1 1 0 ] } E_2 : \{ \begin{bmatrix} -1 \\ 1 \\ 0 \end{bmatrix} \} E 2 : { ⎣ ⎡ − 1 1 0 ⎦ ⎤ }
S = [ − 3 0 − 1 0 1 1 1 0 0 ] S = \begin{bmatrix} -3 & 0 & -1 \\ 0 & 1 & 1 \\ 1 & 0 & 0 \end{bmatrix} S = ⎣ ⎡ − 3 0 1 0 1 0 − 1 1 0 ⎦ ⎤
B = [ 3 0 0 0 3 0 0 0 2 ] B = \begin{bmatrix} 3 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 2 \end{bmatrix} B = ⎣ ⎡ 3 0 0 0 3 0 0 0 2 ⎦ ⎤
Yes diagonalizable.
Example
Let A = [ 4 2 3 2 1 x 0 0 5 ] A = \begin{bmatrix} 4 & 2 & 3 \\ 2 & 1 & x \\ 0 & 0 & 5 \end{bmatrix} A = ⎣ ⎡ 4 2 0 2 1 0 3 x 5 ⎦ ⎤
1) Find all eigenvalues for the matrix A A A .
det ( A − λ I ) = ∣ 4 − λ 2 3 2 1 − λ x 0 0 5 − λ ∣ = ( − 1 ) 3 + 3 ( 5 − λ ) ∣ 4 − λ 2 2 1 − λ ∣ = ( 5 − λ ) [ ( 4 − λ ) ( 1 − λ ) − 4 ] = ( 5 − λ ) [ λ 2 − 5 λ + 4 − 4 ] = − λ ( 5 − λ ) 2 \begin{align*}
\text{det}(A - \lambda I) = \begin{vmatrix} 4 - \lambda & 2 & 3 \\ 2 & 1 - \lambda & x \\0 & 0 & 5- \lambda \end{vmatrix} &= (-1)^{3+3} (5- \lambda ) \begin{vmatrix} 4 - \lambda & 2 \\ 2 & 1- \lambda \end{vmatrix} \\
&= (5 - \lambda ) [(4- \lambda ) (1 - \lambda ) - 4] \\
&= (5- \lambda ) [ \lambda ^2 - 5 \lambda +4 - 4] \\
&= - \lambda (5 - \lambda )^2
\end{align*} det ( A − λ I ) = ∣ ∣ 4 − λ 2 0 2 1 − λ 0 3 x 5 − λ ∣ ∣ = ( − 1 ) 3 + 3 ( 5 − λ ) ∣ ∣ 4 − λ 2 2 1 − λ ∣ ∣ = ( 5 − λ ) [( 4 − λ ) ( 1 − λ ) − 4 ] = ( 5 − λ ) [ λ 2 − 5 λ + 4 − 4 ] = − λ ( 5 − λ ) 2
λ = 0 , 5 , 5 \lambda = 0, 5, 5 λ = 0 , 5 , 5
almu ( 5 ) = 2 \text{almu}(5) = 2 almu ( 5 ) = 2
2) For which values of x x x is the matrix A A A diagonalizable?
A A A is diagonalizable if and only if gemu ( 5 ) = 2 \text{gemu}(5) = 2 gemu ( 5 ) = 2
λ = 5 \lambda =5 λ = 5
Need A − 5 I A - 5I A − 5 I to have rank 1 / nullity 2.
[ − 1 2 3 2 − 4 x 0 0 0 ] → 2 R 1 + R 2 [ − 1 2 3 0 0 6 + x 0 0 0 ] \begin{bmatrix} -1 & 2 & 3 \\ 2 & -4 & x \\ 0 & 0 & 0 \end{bmatrix} \overset{2R_1 + R_2}{\to} \begin{bmatrix} -1 & 2 & 3 \\ 0 & 0 & 6+x \\ 0 & 0 & 0 \end{bmatrix} ⎣ ⎡ − 1 2 0 2 − 4 0 3 x 0 ⎦ ⎤ → 2 R 1 + R 2 ⎣ ⎡ − 1 0 0 2 0 0 3 6 + x 0 ⎦ ⎤
Need 6 + x = 0 ⟹ x = − 6 6+x = 0 \implies x =-6 6 + x = 0 ⟹ x = − 6
Gives A A A diagonalizable