# Method to calculate solution of a linear equation system?

I am searching a solution method for the following equation system of equation systems:

Let $$A, B \in \mathbb{R}^{n \times n}$$ be s.p.d. Matrices and $$O$$ be the zero matrix of the same size. Further let $$f\in\mathbb{R}^n$$ be given vector and $$0$$ the zero vector. I am searching for a numerical method to find the solution vectors $$x_1, x_2 \in\mathbb{R}^n$$ such that

$$$$\begin{pmatrix} A & B \\ O & A \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = \begin{pmatrix} f \\ 0 \end{pmatrix}$$$$

I tried to solve this in Python with (scipy.linalgscipy.linalg: lu_factor, lu_solve). The problem, I only get the trivial solution $$x_2 = 0$$. Is there a way to solve the equation system of equation systems for non-trivial solutions?

• That looks like a saddle point system / Lagrange multiplier system gone awry $[\mathbf A \mathbf B; \mathbf B^T \mathbf 0]$. I'd double check your reference material / formulation, then ask a followup. There are special methods (both iterative and direct) for those kinds of systems. – rchilton1980 Nov 6 '19 at 20:34

There is no way because there is no solution to the given system with $$x_2 \neq 0$$. This is because the second block of the equation system reads $$Ax_2 = 0$$, which has no non-trivial solutions because $$A$$ is SPD (Otherwise $$x_2$$ would be an eigenvector of $$A$$ corresponding to a zero eigenvalue).