Matrices

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Matrix

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

Vector norms From AT A = In we have A−1 = AT which makes finding the


Matrix norms inverse much easier (than doing lots of row operations, imagine
if n = 1000!)
Other Special non square matrices

Matrix
calculations

Walter Diagonal matrix: An A ∈ Rm×n is a diagonal matrix if aij = 0


Mudzimbabwe
when i 6= j.
Operations Notation: We write A =diag(α1 , α2 , · · · , αk ) where
Special
matrices
k = min{m, n} then
Vector norms

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

Not that this is not necessarily square.


Vector norms

Matrix
calculations

Walter A vector norm on Rn is a function f : Rn −→ R such that:


Mudzimbabwe
1 f (x) ≥ 0, ∀ x ∈ Rn
Operations
2 f (x + y) ≤ f (x) + f (y), ∀ x, y ∈ Rn
Special
matrices
3 f (αx) = |α|f (x), ∀ α ∈ R, ∀ x ∈ Rn .
Vector norms

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

which implies ||Qx||2 = ||x||2 since the norm can not be


negative.
Matrix norms

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

Matrix norms 3 f (αA) = |α|f (A), ∀ α ∈ R, ∀ A ∈ Rm×n .


Again, we denote such an f (x) by ||x||.
Examples:
!1/2
m P n
|aij |2
P
Frobenius norm: ||A||F = .
i j
We can also define p-norms but they are not neccessary in this
course.

You might also like