16 - Projections and Least square fitting of straight line
- if
b
in column space ofA
, then Pb = b -
if
b
⊥ column space, then Pb = 0, since b in null space -
Show example of fitting straight line
- If A has independent columns, then ATA is invertible
- To prove above statement, prove the null space of ATA contains only zero vector
- ATAx = 0
- xTATAx = 0
- (Ax)TAx = 0
- Ax = 0
- x = 0
- Columns are definitely independent if they are perpendicular vectors
17 - Orthogonal basis, Orthogonal square matrix (Q), Gram-Schmidt (A –> Q)
- Orthonormal vector -
- qiTqj = 0, if i is not equal to j
- qiTqj = 1, if i is equal to j
- QTQ = I
- if Q is square - QT = Q-1
- What is made easier?
- Projection matrix calculation
- P = Q(QTQ)-1QT = QQT, I if Q is square
- Gram-Schmidt (make matrix A to Q)
- [Diagram]
- take independent vectors of A - a, b
- Make them orthogonal by projection
- Normalize for orthonormal
- For multiple vectors - one by one take vector and remove components of previous vectors from it
- [Diagram]
18 - Determinants, Properties
- det(I) = 1
- row exchange reverses the sign of determinant
- [Diagram]
- Multiplier from row can be taken common and determinant will be multiplied by the same
- Determinant can be split with respect to one row
- 2 equal or dependent rows –> det = 0
- Subtract l x rowi from rowk –> determinant doesn’t change
- row of 0’s –> det = 0
- upper triangular –> det = product of diagonal entries
- det(A) = 0 ↔ A is singular OR det(A) ≠ 0 ↔ A is invertible
- det(AB) = det(A)*det(B)
- det(AT) = det(A)
**All above properties also holds for column
- determinant of skew-symmetric matrix = 0 (use rule
10
)
19 - Determinant Formula, Cofactors formula, Tridiagonal matrices
- Use rule 3.2 of determinant properties
-
n! terms
- Cofactors - connect nxn determinant to (n-1)x(n-1)
-
det(A) = a11C11 + a12C12 + ….. + a1nC1n
- Tridiagonal matrices [Diagram]
- det(An) = det(An-1) - det(An-2)
20 - Formula for A-1, Cramer’s rule, det(A) = Volume of box
- ACT = det(A) I
-
A-1 = (1 / A ) CT….C = Cofactor matrix - rowi * Cofactorsj = 0 …..if i != j
- Hint: Identical rows
- Cramer’s Rule:
- Used for solving Ax = b
- x = A-1b
-
x = (1 / A ) CTb - x1 = det(B1) / det(A), x2 = det(B2) / det(A)
- Bj = Matrix A with jth column substituted by
b
- Bj = Matrix A with jth column substituted by
- Determinant of 3x3 matrix = Volume of space enclosed by the column vectors (Refer 3b1b video for visualization)