MA1522 Note Binder
MA1522 Note Binder
compiled by:
m. zaidan
qianbo dong
for:
Academic Year 2023-2024, Semester 2
Contents
1 Linear Systems 4
1.1 Elementary Row Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Matrices 5
2.1 Matrix multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Representation of linear system . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Inverses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3.1 Properties of invertible matrices . . . . . . . . . . . . . . . . . . . 6
2.3.2 Finding the inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 LU Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 Partial pivoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.6 Elementary matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.7 Determinant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Vector Spaces 11
3.1 Linear span . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Solution space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Linear independence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.4 Basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.5 Transition matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.6 Row & column space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1
3.7 Finding a basis/extending basis . . . . . . . . . . . . . . . . . . . . . . . 14
3.8 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.9 Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.10 Nullspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.10.1 Dimension theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4 Orthogonality 18
4.1 Orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2 Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3 Gram-Schmidt Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.4 Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.5 QR Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.6 Orthogonal Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6 Diagonalization 33
6.1 Diagonalizable matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.2 Algebraic and geometric multiplicity . . . . . . . . . . . . . . . . . . . . . 33
6.3 Criterion of diagonalizability . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.4 Algorithm to find diagonalization . . . . . . . . . . . . . . . . . . . . . . . 34
7 Orthogonal Diagonalization 35
7.1 P −1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.2 Orthogonally diagonalizable . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.3 Algorithm to find orthogonal diagonalization . . . . . . . . . . . . . . . . 36
7.4 Singular Value Decomposition . . . . . . . . . . . . . . . . . . . . . . . . 36
2
8 Linear Transformations 38
8.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2 Change of Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.3 Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
8.4 Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
8.5 Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3
1 Linear Systems
Definition
1. Type I: Multiply a row by non-zero constant
2. Type II: Interchange two rows
3. Type III: Add a constant multiple of a row to another row
Inversing EROs
E E
A −→
1
· → ... −−→
k
B
E −1 E −1
A ←−1−− · ← ... ←−k−− B
Ek .....E1 A = B
A = E1−1 ...Ek−1 B
4
2 Matrices
Definition
AB is the m × n matrix, such that its (i, j)−entry is
∑
p
ai1 b1j + ... + aip bpj = aik bkj
k=1
AB: pre-multiplication of A to B.
BA: post-multiplication of A to B.
Ax = b
A: coefficient matrix.
x: variable matrix (solution)
b: constant matrix
5
2.3 Inverses
Definition
Given a square matrix of order n A,
if there exists square matrix B of order n
AB = BA = In
1. A is row equivalent to In
2. A has n pivot columns (in REF)
3. Ax = 0 has only the trivial solution x = 0
4. Columns of A are linearly independent
5. x → Ax is one-to-one:
Ax = Ay =⇒ x = y
6. For each column vector b ∈ Rn , Ax = b has an unique solution.
7. Columns of A span Rn
8. x → Ax is surjection:
∀T : Rn → Rm , all elements in Rm can be expressed as Ax in Rn
9. There exists square matrix of order n B such that BA = In
10. There exists square matrix of order n B such that AB = In
11. AT is invertible
12. Columns of A are a basis for Rn
13. Column space of A = Rn
14. Dimension of column space of A = n
15. Rank of A = 0
6
16. Null space of A = {0}
17. 0 is not an eigenvalue of A.
18. det(A) 6= 0
19. Row space of A is Rn
20. c 6= 0, (cA)−1 = 1c A−1
Gauss-Jordan Elimination
1. Write matrix in form A|I
2. RREF to get I|A−1
Adjoint Matrix
1
A−1 = adj(A)
det(A)
2.4 LU Decomposition
Definition
If exclusively Type III operations are used in Gaussian elimination for matrix A,
there exists
A = LU
1. A = LU
2. Find U by getting the REF of A.
3. L is the inverse EROs (A = E1−1 ...Ek−1 U, L = E1−1 ...Ek−1 )
7
Solving linear systems with LU decomposition
If A = LU , to solve Ax = b
1. We get LU x = b
2. Substituting y = U x, we get Ly = b, where Ly is lower triangular
3. Solve for y, by solving (L | b)
4. Solve for x, by solving (U | y)
Definition
If interchanging of rows is needed (Type III operations),
E −1 E E −1
A ←−1−− · ← ...· ←−
i
· ← ...· ←−k−− U, Ei : Ri ↔ Rj
such that P A = LU
8
2.6 Elementary matrices
Definition
A matrix obtained by doing an ERO on an identity matrix.
2.7 Determinant
2 by 2 matrix
( )
a b
Let A =
c d
det(A) = |A| = ad − bc
3 by 3 matrix
a b c
Let A =
d e f
g h i
det(EA) = det(E)det(A)
Cofactor expansion
9
General strategy:
10
3 Vector Spaces
Definition
Let S = {v1 ..., vk } be a subset of Rn .
The linear span is the set of all linear combinations
Definition
The solution space of a homogenous linear system of n variables is the solu-
tion set.
Definition
Let S = {v1 ..., vk } be a subset of Rn .
Given the equation c1 v1 + ... + ck vk = 0:
11
• S is linearly independent ⇐⇒ no vector in S can be written as a linear combi-
nation of other vectors
3.4 Basis
Definition
Let S be a subset of vector space V .
S is a basis if it is the minimal subset of V where span(S) = V
To check if it is a basis
It is sufficient to show two of these conditions to prove S is a basis for V :
1. S is linearly independent
2. span(S) = V
3. dim(V ) = |S|
Definition
Coordinate vector, (v)S is a row vector that represents
the scalar coefficient of the basis, S, of a vector space V to represent vector v
relative to basis, S.
v = c1 v1 + c2 v2 + ... + ck vk
12
Definition
Transition matrix, P is a matrix that transitions a coordinator vector, [v]S , rel-
ative to basis S to a coordinator vector, [v]T , relative to basis T.
Essentially, Switching the representation of a point in a vector space V from a
particular basis S to another particular basis T.
Suppose S and T are basis for vector space V, P [w]S = [w]T
P Q
[v]S1 → [v]S2 → [v]S3
[v]S3 = QP [v]S1
P P −1
[v]S1 → [v]S2 → [v]S1
13
3.6 Row & column space
Definition
Row space is the vector space spanned by the rows.
Let r1 , .... be the rows of A.
14
Using column vectors given a set of vectors
Extending a basis
15
3.8 Consistency
Consistency
Let b ∈ Rm
Using dimension,
let R be a row echelon form of A.
Thus, row echelon form of (A | b) is of the form (R | b′ )
3.9 Rank
Definition
Let R be a row echelon form of A.
Let A be a m × n matrix.
• rank(A) = rank(AT )
• rank(A) = 0 =⇒ A = 0
• rank(A) ≤ min(m, n)
• rank(A) = min(m, n) =⇒ A is full rank
16
• A full rank ⇐⇒ A invertible
3.10 Nullspace
Definition
Let A be a m × n matrix. The nullspace of A is the solution space of Ax = 0.
{v ∈ Rn | Av = 0}
nullity(A) = dim(nullspace of A)
nullity(A) = nullity(R)
= the number of non-pivot columns of R
Dimension Theorem
Let A be a m × n matrix.
rank(A) + nullity(A) = n
17
4 Orthogonality
4.1 Orthogonality
Definition
Dot Product (inner product) of u and v is defined as:
( )
( ) v
1
u · v = u1 v 1 + u2 v 2 = u1 u2
v2
18
Properties of dot product
• Commutative Law: u · v = v · u
• Distributive law: (u + v) · w = u · w + v · w = w · (u + v)
• Scalar: (cu) · v = u · (cv) = c(u · v), c ∈ R
• ||cv|| = |c|||v||
• u·u≥0
• u·u=0⇔u=0
• |u · v| ≤ ||u|| ||v|| (Cauchy-Schwaz ineqality)
• ||u + v|| ≤ ||u|| + ||v||
• d(u, w) ≤ d(u, v) + d(v, w) where d(s, e) represents distance from s to e
Definition
Let S = {v1 , ..., vk } be a subset of Rn
S is orthogonal if every pair of distinct vectors in S are orthogonal:
vi · vj = 0 , ∀i 6= j
S is orthonormal if every distinct vector in S is pairwise orthogonal and a unit
vector
0 i 6= j
vi · vj =
1 i=j
• S orthonormal ⇒ S orthogonal
• S orthogonal ⇒ T ⊆ S is orthogonal
• S orthonormal ⇒ T ⊆ S is orthonormal
• S orthogonal ⇒ S ∪ 0 is orthogonal
• S orthonormal ⇒ 0 ∈
/S
19
Definition
Normalizing is the process of converting an orthogonal set of nonzero vectors
in Rn , S = u1 , .., uk to an orthonormal set of vectors, T = v1 , .., vk .
ui
ui 7→ vi = , ui ∈ S, vi ∈ T
||ui ||
20
Orthogonal sets as basis
Checking if S is a basis for V is made simpler as now you have to only check
one of the following:
• |S| = dim(V )
• span(S) = V
∀w ∈ V, w = c1 u1 + ... + ck uk
4.2 Projection
Definition
Projection is the vector that is imposed onto a vector v by another vector u.
v v u·v v u·v
The project vector, p = ||p|| = ||u||cosθ = ||u|| = v
||v|| ||v|| ||u||||v|| ||v|| ||v||2
21
Projection on orthogonal basis
Method 2:
22
4.3 Gram-Schmidt Process
Definition
Gram-Schmidt Process allows us to find an orthogonal basis from a given
basis for a vector space.
v 1 = u1
u2 · v 1
v 2 = u2 − v1
||v1 ||2
..
.
u2 · v 1 uk · vk−1
v k = uk − v1 − ... − vk−1
||v1 || 2 ||vk−1 ||2
{v1 , v2 , ..., vk } is an orthogonal basis for V.
After normalizing, vi 7→ wi = v1
||v1 ||
{w1 , w2 , ..., wk } is an orthonormal basis for V.
23
4.4 Least Squares
Method 1:
Steps:
Method 2:
Solve the system AT Ax = AT b
The method is guaranteed to get a solution regardless of consistency of sys-
tem.
AT Av1 =AT b
AT Av2 =AT b
AT A(v1 − v2 ) =AT (b − b)
AT A(v1 − v2 ) =0
24
4.5 QR Decomposition
QR Decomposition
Steps:
Application:
Suppose A has linearly independent columns with QR decomposition QR
Ax = b ⇔ QRx = b ⇔ Rx = QT b
where u is the least squares solution to Rx = QT b which is also the least squares
solution to Ax = b
25
Full QR Decomposition
v 1 = u1
u2 · v 1
v 2 = u2 − v1 = 0, Vector is ignored
||v1 ||2
u3 · v 1
v 3 = u3 − v1
||v1 ||2
..
.
After normalizing, vi 7→ wi = v1
||v1 ||
{w1 , w3 , ...} is an orthonormal basis.
Since v2 is a zero vector, we need to extend the orthonormal basis by choosing
a arbituary vector (preferably elementary vectors such as e1 = (1, 0, 0)) and
process it through the above Gram-Schmidt process to obtain a hopefully non-
zero orthogonal basis and normalise it to obtain the extended orthonormal
basis.
26
Let {u1 , u2 , ..., um } be the columns of A
27
4.6 Orthogonal Matrices
Definition
Properties:
Let A and B be orthogonal matricies of the same order
(AB)T (AB) = B T AT AB = I
AB is a orthogonal matrix ( )
Let S = {v1 , ..., vk } ⊆ Rn and A = v1 . . . vk
AT A = Ik ⇔ S is an orthonormal set
28
Premultiplication of Orthogonal matrix with another matrix
( )
Let A = v1 . . . vk where v1 to vk represent the column vectors of A,
( )
P A = P v1 . . . P v k
Then, (P A)T (P A) = AT P T P A = I ⇒ {P u1 , ..., P uk } is an orthonormal set
w = A[w]S = B[w]T
29
5 Eigenvalues, eigenvectors & eigenspaces
Definition
Let A be a square matrix of order n.
Suppose that for some λ ∈ R and nonzero v ∈ Rn :
Av = λv
Then,
• λ is an eigenvalue of A.
• v is an eigenvector of A associated to the eigenvalue λ.
Additionally,
30
Main Theorem for Invertible Matrices
A is an invertible matrix, if and only if any (and hence, all) of the following hold:
Definition
The characteristic polynomial of A:
det(λI − A)
det(λI − A) = 0
5.3 Eigenspace
v is an eigenvector of A associated to λ ⇐⇒ Av = λv
⇐⇒ (λI − A)v = 0
⇐⇒ v ∈ nullspace of (λI − A)
31
Definition
Let λ be an eigenvalue of a square matrix A.
Eigenvectors
32
6 Diagonalization
Definition
A square matrix A is diagonalizable if
there is an invertible matrix P where P −1 AP is a diagonal matrix.
Definition
Algebraic multiplicity of λ, denoted a(λ) is its multiplicity as a root of the
characteristic polynomial of A.
e.g: If the characteristic equation is (λ − 1)3 = 0, a(1) = 3
1 ≤ g(λ) ≤ a(λ)
Diagonalization Theorem
33
If a square matrix A has n distinct eigenvalues, then A is diagonalizable.
Remark: The inverse is not true. If A is diagonalizable, A might not have n distinct
eigenvalues.
Remark: The diagonal matrix D is not unique unless A only has one eigenvalue.
Algorithm
• A is not diagonalizable.
34
7 Orthogonal Diagonalization
7.1 P −1
Remark: P is orthogonal =⇒ P −1 = P T
Definition
A square matrix A is orthogonally diagonalizable if there exists an orthogonal
matrix P such that P T AP is a diagonal matrix.
P T AP = D = DT = (P T AP )T = P T AT P
35
7.3 Algorithm to find orthogonal diagonalization
Algorithm
Non-negativity of eigenvalues of AT A
AT Av = λv =⇒ v T AT Av = v T λv =⇒ ||Av||2 = λ||v||2 ≥ 0
Thus,
let A be a m × n matrix.
Definition
Let A be a m × n matrix, and λ1 , ... be its eigenvalues.
√
σ1 = λ1 ......
36
Algorithm: Singular Value Decomposition
Let A be an m × n matrix.
37
8 Linear Transformations
Definition
Linear tranformation can be seen as a mapping f , from domain of Rn to a
codomain of Rm
f (x1 , x2 , ..., xn ) = a1 x1 + a2 x2 + . . . + an xn
T (x) = Ax, x ∈ Rn
Linear operator
38
8.1 Linearity
Linearity
• T (0) = A0 = 0
• T (cv) = A(cv) = c(Av) = cT (v)
• T (u + v) = A(u + v) = Au + Av = T (u) + T (v)
• For any v1 , ..., vk ∈ Rn and c1 , ..., ck ∈ R,
39
8.2 Change of Bases
Change of basis
= B[v]S
= AP [v]S
B = AP ⇔ A = BP −1
40
Suppose T : Rn to Rm and S1 = {v1 , .., vn } and S2 = {u1 , .., un } are bases for Rn
( )
T (w) = B[w]S1 = T (v1 ) . . . T (vn ) [w]S1
( )
= C[w]S2 = T (u1 ) . . . T (un ) [w]S2
B = CP
41
8.3 Composition
Definition
8.4 Ranges
Definition
Let T : Rn 7→ Rm
The range of T is the set of all images of T : R(T ) = {T (v)|v ∈ Rn } ⊆ Rm
R(T ) = span(T (v)) = span(T (v1 ), ..., T (vn )) where v1 , ..., vn is any basis for Rn
( )
Since T has a standard matrix A = T (e1 ) . . . T (en )
42
8.5 Kernel
Definition
Let T : Rn 7→ Rm with standard matrix A
Kernel of T is the set of all vectors in Rn whose image is 0 ∈ Rm
rank(T ) = rank(A)
Ker(T ) = nullspace of A
nullity(T ) = nullity(A)
∴ rank(T ) + nullity(T ) = n
43