Professional Documents
Culture Documents
Inner product spaces, quadratic forms, and more advanced problem solving
pseudo-inverse or pseudoinverse
+
A or A †
Theorem Let A 2 R . Supp m⇥n
−1
Solve the system Ax = b by taking x = A b
−1 m n n m
Find the inverse TA : ℝ → ℝ to TA : ℝ → ℝ
m×n
In this section: A ∈ ℝ
−1
Solve the system Ax = b by taking x = A b
−1 m n n m
Find the inverse TA : ℝ → ℝ to TA : ℝ → ℝ
Problem: not all systems are consistent, and not all functions are invertible
Video 188
Least Squares ⊥
b − Ax̂ ∈ C
⊥ T
C = Null(A )
T
A (b − Ax)̂ = 0
T T
A Ax̂ = A b Video 194
T −1 T
The normal equation ? x̂ = (A A) A b
If the columns of A
are linearly independent
Video 188
Least Squares ⊥
b − Ax̂ ∈ C
⊥ T
C = Null(A )
T
A (b − Ax)̂ = 0
T T
A Ax̂ = A b Video 194
T −1 T
The normal equation ? x̂ = (A A) A b
By the Invertible Matrix Theorem applied for If the columns of A
T
A A: happens when all its eigenvalues are positive. are linearly independent
Video 188
Least Squares Only for “long”
⊥
b − Ax̂ ∈ C matrices:
m⩾n
⊥ T
C = Null(A )
Overdetermined
systems
T
A (b − Ax)̂ = 0
T T
A Ax̂ = A b Video 194
T −1 T
The normal equation ? x̂ = (A A) A b
By the Invertible Matrix Theorem applied for If the columns of A
T
A A: happens when all its eigenvalues are positive. are linearly independent
Video 188
Least Squares Only for “long”
⊥
b − Ax̂ ∈ C matrices:
m⩾n
⊥ T
C = Null(A )
T
Note: the nullspace of A must be Overdetermined
n systems
mapped onto the zero vector in ℝ T
A (b − Ax)̂ = 0
T T
A Ax̂ = A b Video 194
T −1 T
The normal equation ? x̂ = (A A) A b
By the Invertible Matrix Theorem applied for If the columns of A
T
A A: happens when all its eigenvalues are positive. are linearly independent
If all the columns of A are linearly independent, we can find an
“inverse” (pseudoinverse) which gives us unique least square
solution to the system Ax = b
† T −1 T
A = (A A) A
ON
T
A U Σ V
T
A = UΣV
m n
Here ui ∈ ℝ , vi ∈ ℝ , σi ∈ ℝ
† −1 T
A suggestion: take A = VΣ U
n m n n
σ1 vT1
m m ⋱σ vT2
r
⋮
ON n
= u1 | u2 | … | ur | ur+1 | … | um
zeros vTn
ON
T
A U Σ V
T
A = UΣV
m n
Here ui ∈ ℝ , vi ∈ ℝ , σi ∈ ℝ
0 1 01 1
1 0 ··· 0 1
0 ··· 0
B0 ··· 0C B0 1
··· 0C
B 2 C † 1 B 2 C
⌃r = B .. .. ... .. C ) ⌃r = ⌃r =B. .. .. .. C
@. . .A @ .. . . .A
1
0 0 ··· r 0 0 ··· r
Problem
2 3:3 Compute the pseudoinverse for the matrix
1 1
A = 40 15 from V192, using two methods.
1 0
Theorem: Singular Value Decomposition Let A 2 R m⇥n
0 01
1 pseudoinverse for the matrix 1
Problem
1 2
3:
0 · ·3 Compute
· 0 0 ··· 0 the 1
0 ··· 0 0 ··· 0
B0 1 ·1· · 0 0 · · · 0 C B 0 1
··· 0 0 ··· 0 C
B. 2
C B C
B . 4.. . . 5 .. .. . . .. C B. 2
. . . . . .. C
AB =
. .0 1 . from
. . V192,
. . B .
. .
C using two methods.
. . . .
. .
. . . .C
B C B C
†
⌃ = B 0 0 · · · r 0 · · · 0C ) ⌃ = B 0 0 · · ·B 1
0 ··· 0 C
B 1 0
0 0 ··· 0 0 ··· 0
C B r C
C
B C B 0 0 · · · 0 0 · · · 0C
B. . . . . . . C B . . . . . C
@ .. .. . . .. .. . . .. A @ .. .. . .
. . .. .. m⇥n
. . .. A
Theorem: Singular Value Decomposition Let A 2 R
0 0 · · · 0 0 · · · 0 0 0 · · · 0
be a matrix with rank r. Then A can be written in the form0 · · · 0
m×n n×m
T
A = U ⌃V
0 1 01 1
0 ··· 0
† † T
A correction of the suggestion: take A = VΣ U Pseudoinverse
n m n n
σ1 vT1
m m ⋱σ vT2
r
⋮
ON n
= u1 | u2 | … | ur | ur+1 | … | um
zeros vTn
ON
T
A U Σ V
T
A = UΣV
m n
Here ui ∈ ℝ , vi ∈ ℝ , σi ∈ ℝ
m×n n×m
T † † T
A = UΣV A = VΣ U
Pseudoinverse
m×n n×m
T † † T
A = UΣV A = VΣ U
Pseudoinverse
† T † T T † T T
AA A = (UΣV )(VΣ U )(UΣV ) = UΣΣ ΣV = UΣV = A
m×n n×m
T † † T
A = UΣV A = VΣ U
Pseudoinverse
† T † T T † T T
AA A = (UΣV )(VΣ U )(UΣV ) = UΣΣ ΣV = UΣV = A
† † † T T † T † † T † T †
A AA = (VΣ U )(UΣV )(VΣ U ) = VΣ ΣΣ U = VΣ U = A
m×n n×m
T † † T
A = UΣV A = VΣ U
Pseudoinverse
† T † T T † T T
AA A = (UΣV )(VΣ U )(UΣV ) = UΣΣ ΣV = UΣV = A
† † † T T † T † † T † T †
A AA = (VΣ U )(UΣV )(VΣ U ) = VΣ ΣΣ U = VΣ U = A
† T † T † T
m×m AA = (UΣV )(VΣ U ) = UΣΣ U
m×n n×m
T † † T
A = UΣV A = VΣ U
Pseudoinverse
† T † T T † T T
AA A = (UΣV )(VΣ U )(UΣV ) = UΣΣ ΣV = UΣV = A
† † † T T † T † † T † T †
A AA = (VΣ U )(UΣV )(VΣ U ) = VΣ ΣΣ U = VΣ U = A
† T † T † T
m×m AA = (UΣV )(VΣ U ) = UΣΣ U
† † T T † T
n×n A A = (VΣ U )(UΣV ) = VΣ ΣV
m×n n×m
T † † T
A = UΣV A = VΣ U
Pseudoinverse
† T † T T † T T
AA A = (UΣV )(VΣ U )(UΣV ) = UΣΣ ΣV = UΣV = A
† † † T T † T † † T † T †
A AA = (VΣ U )(UΣV )(VΣ U ) = VΣ ΣΣ U = VΣ U = A
m×m † T
AA = (UΣV )(VΣ U ) = UΣΣ U † T † T Symmetric: because only
symmetric matrices can be
orthogonally diagonalized!
† † T T † T
n×n A A = (VΣ U )(UΣV ) = VΣ ΣV See Video 146.
m×n n×m
T † † T
A = UΣV A = VΣ U
Pseudoinverse
† T † T T † T T
AA A = (UΣV )(VΣ U )(UΣV ) = UΣΣ ΣV = UΣV = A
† † † T T † T † † T † T †
A AA = (VΣ U )(UΣV )(VΣ U ) = VΣ ΣΣ U = VΣ U = A
See Video 190
m×m † T
AA = (UΣV )(VΣ U ) = UΣΣ U † T † T Projection matrix on ColA
† † T T † T
n×n A A = (VΣ U )(UΣV ) = VΣ ΣV Projection matrix on RowA
t
Video 126 x · bk x · bk bk x 1 t
b k = b k = b k = (b k bk )x
kbk k2 kbk k2 kbk k2 kbk k2
1
Projection
1
matrix 1
t t t
P = (b1 b 1 ) + (b 2 b 2 ) + · · · + (b r br )
kb1 k2 kb2 k2 kbr k2
✓ ◆
1 t 1 t 1 t
P x = projM x = (b1 b1 ) + (b 2 b 2 ) + · · · + (b r b r ) x
kb1 k2 kb2 k2 kbr k2
2 3
Inner product v1
⇥ ⇤ 6 v2 7
T
u v = u · v = u1 u 2 u3 u4 6 7 = u 1 v 1 + u2 v 2 + u3 v 3 + u 4 v 4
4 v3 5
v4
Outer product Projection matrix on u; matrix with rank 1
2 3 2 3
u1 u1 v 1 u1 v 2 u1 v 3 u1 v 4
6 u 7 ⇥ ⇤ 6 u v u2 v 2 u2 v 3 u2 v 4 7
T 6 2 7 6
uv = 4 5 v1 v2 v3 v4 = 4 2 1 7
u3 u3 v 1 u3 v 2 u3 v 3 u3 v 4 5
u4 u4 v 1 u4 v 2 u4 v 3 u4 v 4
n×1 1×n
m×n n×m
T † † T
A = UΣV A = VΣ U
Pseudoinverse
† T † T T † T T
AA A = (UΣV )(VΣ U )(UΣV ) = UΣΣ ΣV = UΣV = A
† † † T T † T † † T † T †
A AA = (VΣ U )(UΣV )(VΣ U ) = VΣ ΣΣ U = VΣ U = A
m×m † T
AA = (UΣV )(VΣ U ) = UΣΣ U † T † T Projection matrix on ColA
† † T T † T
n×n A A = (VΣ U )(UΣV ) = VΣ ΣV Projection matrix on RowA
Video 135 Least squares solution to Ax = b
C = Col(A) is a finite-dimensional subspace of ℝm. If
b ∈ ℝm, then projCb is the best approximation to b
from C in the sense that
∥b − projCb∥ ⩽ ∥b − u∥
̂ ⩽ ∥b − Ax∥
∥b − Ax∥
n
for every vector u ∈ C. Then u = Ax for some x ∈ ℝ
C = Col(A)
b
Ax̂ = u = projCb
⊥ T
C = Null(A )
v = projC⊥b
† T † T T † T T
AA A = (UΣV )(VΣ U )(UΣV ) = UΣΣ ΣV = UΣV = A
† † † T T † T † † T † T †
A AA = (VΣ U )(UΣV )(VΣ U ) = VΣ ΣΣ U = VΣ U = A
m×m † T
AA = (UΣV )(VΣ U ) = UΣΣ U † T † T Projection matrix on ColA
† † T T † T
n×n A A = (VΣ U )(UΣV ) = VΣ ΣV Projection matrix on RowA
† †
Vector x* = A b is an exact solution to Ax = AA b
† † † †
x = (A A)x + (I − A A)x = A b + (I − A A)x
†
If Ax = b has a solution, then x* = A b is the solution with minimal norm.
†
Because the system is consistent, b ∈ ColA, so b = AA b, and therefore x* is a solution.
† † † †
x = (A A)x + (I − A A)x = A b + (I − A A)x
Pythagorean Theorem gives us:
†
If Ax = b has a solution, then x* = A b is the solution with minimal norm.
†
Because the system is consistent, b ∈ ColA, so b = AA b, and therefore x* is a solution.
† † † †
x = (A A)x + (I − A A)x = A b + (I − A A)x
Pythagorean Theorem gives us:
2 † 2 † 2 † 2
∥x∥ = ∥A b∥ + ∥(I − A A)x∥ ⩾ ∥A b∥
This shows that
†
∥x∥ ⩾ ∥A b∥
† † † †
x = (A A)x + (I − A A)x = A b + (I − A A)x
Pythagorean Theorem gives us:
2 † 2 † 2 † 2
∥x∥ = ∥A b∥ + ∥(I − A A)x∥ ⩾ ∥A b∥
This shows that
†
∥x∥ ⩾ ∥A b∥
†
More properties: AA is an orthogonal projection matrix onto ColA
†
A A is an orthogonal projection matrix onto RowA
†
A b is a least square solution to Ax = b
if the system Ax = b is consistent, then A †b is its solution with the smallest norm.