# Why the product of symmetric-sparse matrices is not symmetric, or dense

For the equation $\frac{\partial u}{\partial t}=-(-\Delta)u$ with zero boundary condition using finite element method. Applying the corresponding weak formulation and taking $v=\phi_{j},j=1,2,...,N$, We obtain the following equation.

$$\sum\limits_{i=1}^{N} \frac{du_{i}}{dt}\int _{\Omega} \phi_{i}\phi_{j}d\Omega=-\sum\limits_{i=1}^{N}u_{i} \int _{\Omega} \nabla\phi_{i}.\nabla\phi_{j}d\Omega\,.$$

Introducing the mass $\mathcal {M}_{i,j}=\int _{\Omega} \phi_{i}\phi_{j}d\Omega$ and stiffness matrices $\mathcal{K}_{i,j}=\int _{\Omega} \nabla\phi_{i}.\nabla\phi_{j}d\Omega$.

Then we have $$\frac{d\bf{u}}{dt}=-\mathcal{M}^{-1}\mathcal{K}\bf{u}\, ,$$

so far, we have derived an approximation matrix representation of the Diffusion equation for the finite element method that.is $A=\mathcal{M}^{-1}\mathcal{K}$.

So my question is why $A$ is not only nonsymmetric, also dense. Although both $\mathcal{M}$ and $\mathcal{K}$ are positive-semidefinite and sparse.

• Since $M$ is positive definite you would probably prefer to compute a Cholesky factorization of it. Then in that case, you might rearrange your products to still have a symmetric system. Still, that will change the sparsity of your matrix, then it's probably a better idea to solve the system of equations. Since your mass matrix is constant you just compute the decomposition once and then iterates over time. Commented Apr 22, 2017 at 14:23
• I just want to introduce the matrix approximation to fractional Laplacian by nonfractional Laplacian approxiamtion . or rather, I would like to use Lanczos approxiamtion to solve the equations. so it concerns the property of matrix $A$. @nicoguaro Commented Apr 22, 2017 at 14:30
• $K$ is the approximation to the Laplace operator, not $A$. Commented Apr 22, 2017 at 15:03
• The product of two symmetric matrices is symmetric iff they commute! Commented Apr 23, 2017 at 1:27
• just $A$ i the approxiamtion to the Laplacian , is there some vague places what i state about my question above? @nicoguaro Commented Apr 23, 2017 at 2:40

You seem to think that:

1. The product of two sparse matrices is sparse;
2. The inverse of a sparse matrix is sparse;
3. The product of two symmetric matrices is symmetric.

None of these facts is true, in general. When it happens, it's the exception, not the rule. Try yourself on some random examples.

It's like believing that $(a+b)^2=a^2+b^2$: that would be nice, and a student could intuitively expect it, but unfortunately it's true only in very special cases.

• I know that a product of symmetric matrices is seldom symmetric and the inverse of a sparse matrix is usually dense. But for illustration, could you give a proof about that discussion above. @Federico Poloni Commented Apr 22, 2017 at 9:51
• Trying with random examples might work as a proof, since they would be counter examples. Commented Apr 22, 2017 at 14:18
• @J. Xie, you might be interested in learning that any unsymmetric matrix can be expressed as a product of two symmetric matrices. (See e.g. this.) Commented Apr 22, 2017 at 17:04
• Thanks for your answer ! I just want to develop some algorithm to solve some equations with the representation of non- symmetric matrix about factual [email protected]. Commented Apr 23, 2017 at 2:46
• The product of sparse matrices is sparse. It's just typically less sparse than what you started with.
– cfh
Commented Apr 24, 2017 at 10:31