Recall that
the basis of a vector space ,
,
are linearly independent and span.
The number of basis vectors for vector space
is the dimension of .
A specific type of vector space, column space of matrix ,
is written as .
It is defined as the set of all linear combinations of the columns of ,
also written as .
Let be an matrix, with column vectors , , , .
A linear combination of theses vectors is therefore
where are scalars.
That is, the columns space of
is the span of the vectors , , , .
We also have
where is an vector,
Therefore, column space
consists of all vectors in the form of .
Like any other vector space,
a column space also has basis vectors.
The number of basis vectors for ,
or the dimension of
is called the rank of .
In other words, the rank of
is the dimension of column space .
The rank of is also the maximum number of linearly independent columns in .
This is because we can write all the dependent columns as a linear combination
of these linearly independent columns.
Given that consists of all possible linear combination of columns in ,
any member in can also be written as a linear combination
of these linearly independent columns.
These linearly independent columns span and form a basis for ,
and the number of these vectors becomes the dimension of
or rank of .
In the previous post
on eigendecomposition, the rank of each projection matrix
is 1.
Recall that each projection matrix only have one non-zero eigenvalue.
This is not a coincidence.
It can be shown that the rank of a symmetric matrix is equal to the number
of its non-zero eigenvalues.
Let’s return to the eigendecomposition equation.
Suppose that we apply our symmetric matrix to an arbitrary vector .
Now the eigendecomposition equation becomes:
Recall the important property of symmetrix matrices
in the last post.
An symmetric matrix has real eigenvalues,
as well as linear independent and orthogonal eigenvectors.
These eigenvectors can be used as a new basis of a vector .
In other words, a vector can be uniquely written
as a linear combination of the eigenvectors of
Recall that all the eigenvectors of a symmetric matrix are orthogonal.
To find each coordinate , we just need to draw a line perpendicular
to an axis of through point
and see where they intersect.
Therefore, each coordinate is equal to the dot product of and ,
and can be re-written as
Now if we multiply by , we get:
and since the vectors are eigenvectors of ,
the last equation simplies to:
which is the eigendecomposition equation.
Each of the eigenvectors is normalized,
so they are unit vectors.
In each term of the eigendecomposition equation,
gives a new vector which is the orthogonal projection
of onto .
Then this vector is scaled by .
Finally all the vectors are summed together
to give .
This process is shown in Figure 1.
Transforming a vector along eigenvectors of matrix A.
The eigendecomposition mathematically explains an important property
of symmetric matrices that we have seen in the plots before.
A symmetric matrix transforms a vector by stretching or shrinking it
along its eigenvectors,
and the amount of stretching or shrinking along each eigenvector
is proportional to the corresponding eigenvalue.
In addition, the eigendecomposition can break an symmetric matrix
into matrices with the same shape () multiplied
by one of the eigenvalues.
The eigenvalues play an important role here
since they can be thought of as a multiplier.
The projection matrix only projects onto each ,
and the eigenvalue scales the length of the vector projection ().
The bigger the eigenvalue, the bigger the length of the resulting vector
() is,
and the more weight is given to its corresponding matrix ().
We can approximate the original symmetric matrix by summing the terms
which have the highest eigenvalues.
For example, if we assume the eigenvalues have been sorted
in descending order,
then we can take only the first terms in the eigendecomposition equation
to have a good approximation for the original matrix:
where is an approximation of with the first terms.
If in the original matrix , the other eigenvalues that we left out
are very small and close to zero,
then the approximated matrix in a very similar to the original matrix,
and we have a good approximation.
Matrix
with
is an example.
Here is very small compared to .
We could approximate with its first term in eigendecomposition
corresponding to eigenvalue .
Let’s visualize this by applying to vectors
on a unit circle.
Approximate a matrix with its first projection matrix.
Multiplying by results in a very similar shape
compared to multiplying by .
Keep in mind that
a symmetric matrix is required for the eigendecomposition equation to hold.
Suppose that you have a non-symmetric matrix:
the eigenvectors are not linear independent,
and the eigenvalues have both real and imaginary parts.
Without real eigenvalues, we cannot properly scale projected vectors.
Or consider another non-symmetric matrix:
Here the eigenvectors are linearly independent, but are not orthogonal,
and they do not show the correct direction of stretching
after transformation.
The eigendecoposition method is very useful,
but only works for a symmetric matrix.
A symmetric matrix is always a square matrix.
If you have a non-square matrix, or a square but non-symmetric matrix,
then you cannot use the eigendecomposition method to approximate it
with other matrices.
Singular Value Decomposition overcomes this problem,
which will the topic of our next post.