[Math] Given Matrices A and B, find x where Ax = B

algebra-precalculusmatricesmatrix equationssystems of equations

I'm given two simple matrices, and I'm told to solve for x.

$A =\begin{pmatrix}\ 3 &-1 & 3\\1&0&3\\3&-2&-5&\end{pmatrix}$
$B =\begin{pmatrix}\ 14\\11\\-11\end{pmatrix}$

I'm told to find x, where $Ax = B$

I tried doing this:

$A =\begin{pmatrix}\ 3 &-1 & 3\\1&0&3\\3&-2&-5&\end{pmatrix}$
$\begin{pmatrix}\ x\\x\\x\end{pmatrix}$

$B =\begin{pmatrix}\ 14\\11\\-11\end{pmatrix}$

Then I tried to multiply it out, and equate each row to b, however I got x = 14/5 and x = 11/4 , so I'm not even sure if I can do this, let alone don't know if this is correct?

Best Answer

You can find $x$ by multiplying both sides of $Ax=B$ by the inverse of $A$, i.e. $$\begin{align*} Ax&=B\\ A^{-1}Ax&=A^{-1}B\\ Ix&=A^{-1}B&\text{where }I\text{ is the identity matrix} \end{align*}$$ Since for any matrix $M$, the inverse is given by $$M^{-1}=\frac{1}{\det M}\text{adj}M$$where $\text{adj}M$ is the adjugate of $M$, you have $$\begin{align*} A^{-1}&=\frac{1}{\det A}\text{adj}A\\[1ex] &=\frac{1}{\begin{vmatrix}3 &-1 & 3\\1&0&3\\3&-2&-5\end{vmatrix}}\text{adj}\begin{pmatrix}3 &-1 & 3\\1&0&3\\3&-2&-5\end{pmatrix}\\[1ex] &=\frac{1}{\begin{vmatrix}1&3\\3&-5\end{vmatrix}+2\begin{vmatrix}3&3\\1&3\end{vmatrix}} \begin{pmatrix} \begin{vmatrix}0&3\\-2&-5\end{vmatrix}&-\begin{vmatrix}1&3\\3&-5\end{vmatrix}&\begin{vmatrix}1&0\\3&-2\end{vmatrix}\\[1ex] -\begin{vmatrix}-1&3\\-2&-5\end{vmatrix}&\begin{vmatrix}3&3\\3&-5\end{vmatrix}&-\begin{vmatrix}3&-1\\3&-2\end{vmatrix}\\[1ex] \begin{vmatrix}-1&3\\0&3\end{vmatrix}&-\begin{vmatrix}3&3\\1&3\end{vmatrix}&\begin{vmatrix}3&-1\\1&0\end{vmatrix} \end{pmatrix}^T\\[1ex] &=\frac{1}{-2}\begin{pmatrix}6&14&-2\\ -11&-24&3\\ -3&-6&1\end{pmatrix}^T\\[1ex] &=-\frac{1}{2}\begin{pmatrix}6&-11&-3\\ 14&-24&-6\\ -2&3&1\end{pmatrix} \end{align*}$$ Multiply by $B$ and you should get $$x=\begin{pmatrix}2\\1\\3\end{pmatrix}$$