# Does the product of two p.s.d kernel matrices result in a kernel matrix?

In a ML setting, where $a_1,..., a_n$ are a set of training points. A kernel function is a function $κ$ that gives the inner product between two vectors in the feature space: $κ(a_i, a_j ) = ψ(a_i) · ψ(a_j )$ where $ψ$ is a non-linear function.

We can form an $n × n$ matrix $K$, called the kernel matrix, whose $(i,j)$ entry corresponds to $κ(a_i , a_j )$. Here, $K$ is symmetric and positive semi-definite and can be factorized as $K=XX^T$ where $X=U\lambda^{1/2}$ given that $K=U \lambda U^T$ is the spectral decomposition of the kernel matrix.

Question:-

Now given two kernel matrices $K_1$ and $K_2$, is $K_p=K_1K_2$ a kernel matrix?

• Note that the element-wise product of two kernel matrices is a valid kernel matrix, however. – Sycorax says Reinstate Monica Jun 20 '16 at 14:54

No, not unless the columns of $U_1$ are a permutation of the columns of $U_2$. Otherwise you can get an asymmetric matrix very easily, and kernel Gram matrices are always symmetric.