Matrices
Matrices
Matrices
calculations
Walter
Mudzimbabwe
Operations
Special
matrices
Matrix calculations
Vector norms
Matrix norms
Walter Mudzimbabwe
Matrix operations
Matrix
calculations
Let A ∈ Rm×n then we write
Walter
Mudzimbabwe
a11 · · · a1n
Operations .. .. ..
Special
A = [aij ] = . . .
matrices
am1 · · · amn
Vector norms
Matrix norms
Addition: Rm×n × Rm×n −→ Rm×n : C = A + B where
cij = aij + bij
Scalar multiplication: R × Rm×n −→ Rm×n : C = αA where
cij = αaij
Multiplication: Rm×n × Rn×p −→ Rm×p : C = AB where
Pn
cij = aik bkj
k=1
Transpose: Rm×n −→ Rn×m : C = AT where cij = aji
Special square matrices
Matrix
calculations
Symmetric matrix: An A ∈ Rn×n is symmetric if AT = A.
Walter Examples:
Mudzimbabwe
4 0 1 10
Operations 1 7 3
7 4 5 ,
0 −3 6 −2 .
Special
matrices 1 6 1 10
3 5 0
Vector norms 10 −2 10 10
Matrix norms
Orthogonal matrix: An A ∈ Rn×n is orthogonal if AT A = In
where In ∈ Rn×n is an identity matrix.
The columns and rows are orthonormal ie if you take the dot
product of any two columnns or rows, the product is 0.
Examples:
−1 0 0
cos(θ) − sin(θ) 1 0
, , 0 −1 0
sin(θ) cos(θ) 0 −1
0 0 1
Orthogonal matrices
Matrix
calculations
Walter
Mudzimbabwe
Operations
Special
matrices
Matrix
calculations
Matrix norms
A = [aij ] is diagonal and aii = αi for i = 1, 2, · · · , k
Examples:
7 0 4 0 0
0 −5 , 3 0 0 0 7
, 0 .
0 6 0
0 0 0 0 −13
Matrix
calculations
Matrix norms
We denote such an f (x) by ||x||.
Examples:
Holder/p-norms: ||x||p = (|x1 |p + |x2 |p + · · · + |xn |p )1/p For
example:
1 ||x||1 = |x1 | + |x2 | + · · · + |xn |
2 ||x||2 = (|x1 |2 + |x2 |2 + · · · + |xn |2 )1/2 = (xT x)1/2
3 ||x||∞ = max |xi |
i
Vector norms
Matrix
calculations
Exercise: Prove that the 2-norm is invariant under orthogonal
Walter
Mudzimbabwe transformations
Solution: By a an orthogonal transformation of x, we mean Qx
Operations
Special
where Q is an orthogonal matrix. So the question is asking you
matrices to prove that ||Qx||2 = ||x||2 .
Vector norms Now
Matrix norms
||Qx||22 = (Qx)T Qx
= xT QT Qx
= xT x, since QT Q = In , because Q is orthogonal
= ||x||22
Matrix
calculations
Walter
Mudzimbabwe
A matrix norm on Rm×n is a function f : Rm×n −→ R such
that:
Operations
Special
1 f (A) ≥ 0, ∀ A ∈ Rm×n with f (A) = 0 iff A = 0
matrices
2 f (A + B) ≤ f (A) + f (B), ∀ A, B ∈ Rm×n
Vector norms