EECE 522 Notes - 01b Review of Matrices and Vectors
EECE 522 Notes - 01b Review of Matrices and Vectors
1/45
Vectors & Vector Spaces
Definition of Vector: A collection of complex or real numbers,
generally put in a column v
1 Transpose
v = " = [v1 ! v N ]T
v N
a1 b1 a1 + b1
a = " b = " a + b = "
a N bN a N + bN
2/45
Definition of Scalar: A real or complex number.
a1 αa1
a = " αa = "
a N αa N
(x + y ) + z = y + (x + z )
2. Associativity α(βx) = (αβ)x
α ( x + y ) = αx + α y
3. Distributivity
(α + β)x = αx + βx
1x = x
4. Scalar Unity &
Scalar Zero 0x = 0, where 0 is the zero vector of all zeros
4/45
Definition of a Vector Space: A set V of N-dimensional vectors
(with a corresponding set of scalars) such that the set of vectors
is:
(i) “closed” under vector addition
(ii) “closed” under scalar multiplication
In other words:
• addition of vectors – gives another vector in the set
• multiplying a vector by a scalar – gives another vector in the set
Examples:
1. The space R2 is a subspace of R3.
2. Any plane in R3 that passes through the origin is a subspace
3. Any line passing through the origin in R2 is a subspace of R2
4. The set R2 is NOT a subspace of C2 because R2 isn’t closed
under complex scalars (a subspace must retain the original
space’s set of scalars)
7/45
Geometric Structure of Vector Space
Length of a Vector (Vector Norm): For any vector v in CN
we define its length (or “norm”) to be
N N
∑v 2
= ∑ vi
2
2
v 2
= i v
i =1 2
i =1
α v1 + β v 2 2
≤ α v1 2
+ β v2 2
v 2
< ∞ ∀v ∈ C N
v 2
= 0 iff v = 0
8/45
Distance Between Vectors: the distance between two
vectors in a vector space with the two norm is defined by:
d ( v1 , v 2 ) = v1 − v 2 2
v1 v1 – v2
v2
9/45
Angle Between Vectors & Inner Product:
v
Motivate the idea in R :
2
A cos θ 1
A v = A sin θ u=
θ 0
u
2
Note that: ∑u v
i =1
i i = 1 ⋅ A cos θ + 0 ⋅ A sin θ = A cos θ
10/45
Inner Product Between Vectors :
Define the inner product between two complex vectors in CN by:
N
< u, v >= ∑ u i vi*
i =1
2
3. Linking Inner Product to Norm: v 2
=< v, v >
12/45
Building Vectors From Other Vectors
Can we find a set of “prototype” vectors {v1, v2, …, vM} from
which we can build all other vectors in some given vector space V
by using linear combinations of the vi?
M M
v = ∑α k v k u = ∑ βk vk
k =1 k =1
Same “Ingredients”… just different amounts of them!!!
16/45
Expansion and Transformation
Fact: For a given basis {v1, v2, …, vN}, the expansion of a vector v
in V is unique. That is, for each v there is only one, unique set of
N
coefficients {α1, α2, … , αN} such that v = α v
∑k =1
k k
18/45
DFT from Basis Viewpoint:
If we have a discrete-time signal x[n] for n = 0, 1, … N-1
x = [x[0] x[1] ! x[ N − 1]]
T
Define vector:
Define a orthogonal basis from the exponentials used in the IDFT:
1 1 1 1
1 e j 2 π1⋅1 / N e j 2 π 2⋅1 / N e j 2 π ( N −1)⋅1 / N
d0 =
"
d1 =
"
j 2 π1( N −1) / N
d2 =
"
j 2 π 2( N −1) / N
… d N −1 =
"
j 2 π( N −1)( N −1) / N
1 e e e
α i = v, v i = αi
N N
Then…. v = ∑αk vk u = ∑ βk vk
k =1 k =1
21/45
Example: DFT Coefficients as Inner Products:
Recall: N-pt. IDFT is an expansion of the signal vector in terms of
N Orthogonal vectors. Thus
X [k ] = x, d k
N −1
= ∑ x[ n ]d *
k [n ]
n =0
N −1
= ∑ x[n]e − j 2πkn / N
n =0
See “reading notes” for some details about normalization issues in this case
22/45
Matrices
Matrix: Is an array of (real or complex) numbers organized in
rows and columns. a11 a12 a13 a14
Here is a 3x4 example:
A = a 21 a 22 a 23 a 24
a31 a32 a33 a34
A, A −1
y2
x1 y1
x2
To see this:
< v1 , v1 > < v1 , v 2 > ! < v1 , v N >
< v , v > < v , v > ! < v 2 , v N >
VV H = 2 1 2 2
1 0 ! 0
0 1 ! 0 Inner products are 0 or 1
= =I because this is an ON basis
" ' "
0 0 ! 1
29/45
Unitary and Orthogonal Matrices
A unitary matrix is a complex matrix A whose inverse is A-1 = AH
For the real-valued matrix case… we get a special case of “unitary”
the idea of “unitary matrix” becomes “orthogonal matrix”
for which A-1 = AT
Two Properties of Unitary Matrices: Let U be a unitary matrix
and let y1 = Ux1 and y2 = Ux2
1. They preserve norms: ||yi|| = ||xi||.
2. They preserve inner products: < y1, y2 > = < x1, x2 >
That is the “geometry” of the old space is preserved by the unitary
matrix as it transforms into the new space.
(These are the same as the preservation properties of ON basis.)
30/45
DFT from Unitary Matrix Viewpoint:
Consider a discrete-time signal x[n] for n = 0, 1, … N-1.
N −1
We’ve already seen the DFT in a basis viewpoint: 1
x= ∑ N X [k ] d k
k =0 &
#%#
$
αk
Now we can view the DFT as a transform from the Unitary matrix
viewpoint:
1 1 1 ! 1
1 e j 2 π1⋅1 / N e j 2 π 2⋅1 / N ! e j 2 π ( N −1)⋅1 / N
D = [d 0 | d1 | … | d N −1 ] =
" " " "
j 2 π1( N −1) / N j 2 π ( N −1)( N −1) / N
1 e e j 2 π 2 ( N −1) / N ! e
DFT IDFT
~
x = DH x 1 ~
x = Dx
N
(Acutally D is not unitary but N-1/2D is unitary… see reading notes) 31/45
Geometry Preservation of Unitary Matrix Mappings
Recall… unitary matrices map in such a way that the sizes of
vectors and the orientation between vectors is not changed.
A, A −1
y2
x1
x2
y1
A, A −1
Unitary mappings just
“rigidly rotate” the space.
32/45
Effect of Non-Unitary Matrix Mappings
A, A −1
y2
x1
x2
y1
A, A −1
33/45
More on Matrices as Transforms
We’ll limit ourselves here to real-valued vectors and matrices
Rn Rm
A y
x
x A y
Otherwise….The range(A) ⊂ Rm
…because the columns don’t span Rm
35/45
Rank of a Matrix: rank(A) = largest # of linearly independent
columns (or rows) of matrix A
For an m×n matrix we have that rank(A) ≤ min(m,n)
An m×n matrix A has “full rank” when rank(A) = min(m,n)
Example: This matrix has rank of 3 because the 4th column cam be
written as a combination of the first 3 columns
1 0 0 1
0 1 0 2
A = 0 0 1 1
0 0 0 0
0 0 0 0
36/45
Characterizing “Tall Matrix” Mappings
We are interested in answering: Given a vector y, what vector x
mapped into it via matrix A?
“Tall Matrix” (m > n) Case
If y does not lie in range(A), then there is No Solution
If y lies in range(A), then there is a solution (but not
necessarily just one unique solution)
y = Ax
y∉range(A) y∈range(A)
39/45
Characterizing “Square Matrix” Mappings
One Solution
y∉range(A) y∈range(A)
41/45
Eigenvalues and Eigenvectors of Square Matrices
If matrix A is n×n, then A maps Rn → Rn
Q: For a given n×n matrix A, which vectors get mapped into
being almost themselves???
More precisely… Which vectors get mapped to a scalar multiple
of themselves???
Even more precisely… which vectors v satisfy the following:
Av = λv
Input Output
These vectors are “special” and are called the eigenvectors of A.
The scalar λ is that e-vector’s corresponding eigenvalue.
v Av
42/45
“Eigen-Facts for Symmetric Matrices”
• If n×n real matrix A is symmetric, then
– e-vectors corresponding to distinct e-values are orthonormal
– e-values are real valued
– can decompose A as A = VΛ V T
V = [v1 v2 ! vn ] VV T = I
Λ = diag{λ1 , λ2 ,…, λn }
• If, further, A is pos. def. (semi-def.), then
– e-values are positive (non-negative)
– rank(A) = # of non-zero e-values
• Pos. Def. ⇒ Full Rank (and therefore invertible)
• Pos. Semi-Def. ⇒ Not Full Rank (and therefore not invertible)
– When A is P. D., then we can write
A −1 = VΛ −1 V T
{ }
For P.D. A, A-1 has
the same e-vectors and Λ −1 = diag 1 λ , 1 λ ,…, 1 λ
1 2 n
has reciprocal e-values 43/45
Other Matrix Issues
We’ll limit our discussion to real-valued matrices and vectors
Quadratic Forms and Positive-(Semi)Definite Matrices
Quadratic Form = Matrix form for a 2nd-order multivariate
polynomial
x1 a11 a12
Example: x = A =
x2 a 21 a 22
variable fixed
The quadratic form of matrix A is:
QA ( x1 , x2 ) = x T Ax (1 × 2) ⋅ ( 2 × 2) ⋅ ( 2 × 1) = (1 × 1) scalar
2 2
scalar = ∑∑ ij i j 11 1 22 2 + (a12 + a21 ) x1 x2
a x x = a x 2
+ a x 2
i =1 j =1 44/45
• Values of the elements of matrix A determine the characteristics
of the quadratic form QA(x)
– If QA(x) ≥ 0 ∀x ≠ 0… then say that QA(x) is “positive semi-definite”
– If QA(x) > 0 ∀x ≠ 0… then say that QA(x) is “positive definite”
– Otherwise say that QA(x) is “non-definite”
• These terms carry over to the matrix that defines the Quad Form
– If QA(x) ≥ 0 ∀x ≠ 0… then say that A is “positive semi-definite”
– If QA(x) > 0 ∀x ≠ 0… then say that A is “positive definite”
45/45