0.Conclusion

To conclude with, Gram and Kernel matrices are both symmetric matrices so that they are eligible to Eigen-decomposition, i.e., , where is a Eigenvalue and is its Eigenvector, , and . They are positive semi-definite matrices, which means and . If they are not singular, i.e., , they are positive definite.


1.Gram Matrix and Kernel Matrix

Given a set of vectors , the Gram matrix is defined as an matrix whose elements are . The notation denotes the operation of inner product [1]. If a kernel function is utilised to evaluate the inner products in a feature space with feature map , i.e., the Gram matrix has entries:

.

This matrix is often referred to as Kernel matrix .

It is obvious that the Kernel matrix is symmetric.


2.Symmetric Matrix! Eigenvalues and Eigenvectors

2.1 Orthogonal

Due to the fact that the Gram/Kernel matrix is symmetric, it could be inferred that its Eigenvectors corresponding to different Eigenvalues are orthogonal. This is because, if are two different Eigenvalues corresponding to Eigenvectors in symmetric matrix , we have:

and therefore , i.e., the two Eigenvectors are orthogonal.

For Eigenvalues that appear multiple times, one can always find an orthonormal basis (Eigenvectors) for the corresponding Eigenspace, e.g., through Gram-Schmidt. Overall, since the Eigenspaces of different Eigenvalues are mutually orthogonal, all the Eigenvectors can be chosen to give an orthonormal set.

2.2 Deflation

With this property in mind, we are able to further explore the deflation of a symmetric matrix . Given an Eigenvalue and Eigenvector pair of matrix , the deflation is a transformation:

.

Note that is normalised, i.e., , and therefore:

,

which says the deflation maintains the Eigenvector, but reduces the corresponding Eigenvalue to 0.

2.3 Decomposition

By repeatedly finding the Eigenvector corresponding to the largest positive (or smallest negative) Eigenvalue and then deflating, we can always find an orthonormal set of Eigenvectors that helps decompose the original symmetric matrix. More formally, the eigen-decomposition of the matrix is formulated as:

.

This is derived from the fact that , i.e., , where the columns in are the orthonormal Eigenvectors such that and is a diagonal matrix with . We assume that . Also, it follows that:

, and .


3.Positive Semi-definite Matrix!

A matrix is positive semi-definite if its Eigenvalues are all non-negative. A symmetric matrix is not necessarily a positive semi-definite matrix. However, gram and kernel matrices are positive semi-definite (it’s not because of they are symmetric).

Another way of saying a matrix is semi-definite is , it has: .

To prove Gram and Kernel matrices are positive semi-definite, for a general case of kernel matrix:

for .

Therefore, for any vector , we have:

We also have the proposition that, a matrix is positive semi-definite if and only if for some real matrix , i.e., .


4.Determinant and Trace

4.1 About the Determinant

The determinant of a symmetric matrix is the product of the Eigenvalues of the matrix . If the matrix is positive definite, the determinant would be strictly positive. If the matrix is positive semi-definite, the determinant could be zero when the matrix is a singular matrix.

It also has:

4.2 About the Trace

For the trace of a symmetric matrix, we have . In other words, for gram and kernel matrices, it has:

,

.


5.Singular Matrix?

If a matrix is singular, it means that there is a non-trivial solution for the equation:

.

And this shows equivalently that:

  • If a matrix is singular, its column vectors are linear dependent and span a space of dimension less than the number of columns;
  • If a matrix is singular, it has at least one eigenvalue equal to 0.

On the other hand:

  • If a matrix is non-singular, its column vectors are linear independent and span a space of dimension equal to the number of columns;
  • If a matrix is non-singular, due to the fact that its columns span the space of dimension equal to the number of columns, e.g., for matrix it has and then , we are able to find the multiplicative inverse of the matrix, i.e., .

Note that, we cannot conclude whether Gram matrix and Kernel matrix are singular or not according to their definition. Consider a dataset that has two same data points, there will be two same columns in the Gram/Kernel Matrix such that the columns are linear dependent, i.e., singular. Therefore, singularity is an application-specific property.


[1] John Shawe-Taylor, Nello Cristianini, Kernel methods for pattern analysis, Cambridge University Press, 2004.