# Solving $Ax = b$ when $A$ is singular

I have a system of equations, expressed as

$\mathbf{A} \begin{pmatrix}x_1 \\ x_2 \\ x_3 \\ x_4 \end{pmatrix} = \begin{pmatrix} 0 \\ i (\frac{1}{2} + C - a) \\ i(\frac{1}{2} - C - a) \frac{m \cos(\alpha)}{k} \\ -i(\frac{1}{2} - C - a) \frac{\sqrt{m^2 + k^2} + m \sin(\alpha)}{k} \end{pmatrix}$

$\mathbf{A} = \begin{pmatrix} m \sin(\alpha) - \sqrt{m^2 + k^2} & m \cos(\alpha) & k & 0 \\ m \cos(\alpha) & -m\sin(\alpha) - \sqrt{m^2 + k^2} & 0 & k \\ k & 0 & -m\sin(\alpha) - \sqrt{m^2 + k^2} & -m \cos(\alpha) \\ 0 & k & -m \cos(\alpha) & m \sin(\alpha) - \sqrt{m^2 + k^2} \end{pmatrix}$

where $\mathbf{A}$ is a $4\times 4$ singular matrix and $C, a$ are non-zero constants.

I am trying to find $x_n$. If $\mathbf{A}$ is singular, as far as I know, this is only possible if the right-hand side is $0$.

I can set the constraint $\frac{1}{2} -C = a$ so that the RHS becomes $\begin{pmatrix} 0 \\ 2iC \\ 0 \\ 0 \end{pmatrix}$, but that doesn't really get me anywhere. Are there other methods of doing this?

• The only thing one can say is there won't be a unique solution; either there are none or many. Which case applies will depend on details of your $\mathbf A$, which you did not supply. Apr 25, 2013 at 17:35
• To solve $Ax =b$ you must have $b \in {\cal R}(A)$. Without $A$, who can say? Apr 25, 2013 at 17:38
• I've edited my post, $\mathbf{A}$ is now defined and so is the RHS of the expression. Apr 25, 2013 at 17:42
• How have you verified that it is singular? It actually doesn't look like it would be to me. EDIT: Nevermind, it is Apr 25, 2013 at 17:47
• @MichaelC.Grant I obtained $\det(A) = 0$ in Mathematica Apr 25, 2013 at 17:50

If you're comfortable letting a tool like MATLAB do the work, you can always try computing the pseudoinverse and multiplying by the vector:

y = pinv(A) * x;

Then you can see if $A * y = x$. If so, then $x$ is in the range space of $A$; if not, it's not.

If you need to do something symbolic, then what I would suggest is expressing $(x_3,x_4)$ in terms of $(x_1,x_2)$ using the first two rows; then substituting the result into the second two rows. I'll give it a go and see if I can come up with something decent; if so, I'll edit this post.

EDIT: Here's the thought. First, break the coefficient matrix into $2\times 2$ blocks and the LHS and RHS vectors accordingly: $$\begin{bmatrix} A_1 & k I \\ k I & A_2 \end{bmatrix} \begin{bmatrix} \bar{x}_{12} \\ \bar{x}_{34} \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}$$ where $\bar{x}_{12}=\left[\begin{smallmatrix}{x_1\\x_2}\end{smallmatrix}\right]$ and $\bar{x}_{34}=\left[\begin{smallmatrix}{x_3\\x_4}\end{smallmatrix}\right]$. Now you have from the first block row, $$k \bar{x}_{34} = b_1 - A_1 \bar{x}_{12}$$ Substituting back into the second block row, $$k \bar{x}_{12} + A_2 \left( k^{-1} b_1 - k^{-1} A_1 \bar{x}_{12} \right) = b_2$$ Consolidating and multiplying through by $k$, $$( k^2I - A_2 A_1 ) \bar{x}_{12} = k b_2 - A_2 b_1$$ You shouldn't have difficulty computing these quantities symbolically. It should be significantly easier to determine when this $2\times 2$ system has a solution.

EDIT 2: Ha ha! I have a sneaking feeling that $k^2I-A_2A_1\equiv 0$. It certainly does for a couple of numerical instances I tried. If so, there's your answer: the linear system has a solution only when $k b_2 - A_2 b_1 = 0$.

• Yes, the result has to be symbolic. Thanks for the help, I'll also give it a go. Apr 25, 2013 at 17:56
• Alright, I've worked through the maths using your suggestions, and for $kb_2 - A_2 b_1 = 0$ to hold, we need $a = \frac{1}{2}$ and $C = 0$. Unfortunately for me, $C$ cannot be zero (the expressions are from some physics I am working on, and both $a$ and $C$ are non-zero parameters). Apr 25, 2013 at 18:51
• Ouch! Well, do make sure that you used my latest edits here, I had a sign wrong before. But if the analysis holds up, then it looks like your model needs tweaking. (And would you do me the favor of voting this up if you've found it helpful?) Apr 25, 2013 at 18:56
• In any case, thanks a lot for your help! I wanted to vote up your answer, but I don't have the 15 Reputation points required. Apr 25, 2013 at 18:59