# Calculate the intersection of two matrix kernels in MATLAB

If we have a discrete saddle point problem with the coefficient matrix $$\mathcal{A} = \begin{bmatrix} A & B^T \\ B & 0 \end{bmatrix},$$ then $\mathcal{A}$ is invertible, supposing $B$ has full rank and $A$ is positive semidefinite (which hold in my case), if $\mathrm{ker}(A)\cap\mathrm{ker}(B) = \{0\}$. The basis for the kernel or null space of a matrix can be calculated by null(A) in MATLAB. But how should I interpret mathematically and calculate the intersection of the two kernels?

• Please don't sign your posts. – nicoguaro Feb 25 '16 at 15:46
• I cannot even do that. – Zoltán Csáti Feb 25 '16 at 15:57
• I removed your signature at the end of the post "Thanks, Zoltán" – nicoguaro Feb 25 '16 at 16:04

• I really wanted to find that, because if this is empty, then it means that $\mathcal{A}$ is invertible. Unfortunately, in my code, this is not empty. You are clear, the question was subtle. I am doing domain decomposition using the TFETI method. After prescribing all the constraints, $\mathcal{A}$ should be regular. So I do not want to directly use the inverse, I just wanted to calculate it for debugging purposes. – Zoltán Csáti Feb 25 '16 at 16:31