# How do you solve x+3y=5 and x+4y=6 using matrices?

Mar 1, 2016

From $\vec{R} = A \cdot \vec{x}$ multiplying both sides by ${A}^{-} 1$
${A}^{-} 1 \cdot \vec{R} = {A}^{-} 1 A \cdot \vec{x} = I \cdot \vec{x}$
where $A = \left(\begin{matrix}{a}_{11} & {a}_{12} \\ {a}_{21} & {a}_{22}\end{matrix}\right) = \left(\begin{matrix}1 & 3 \\ 1 & 4\end{matrix}\right)$
$\vec{x} = \left(\begin{matrix}x \\ y\end{matrix}\right) , \vec{R} = \left(\begin{matrix}5 \\ 6\end{matrix}\right)$
${A}^{-} 1 = \left(\begin{matrix}4 & - 3 \\ - 1 & 1\end{matrix}\right)$

Answere $\implies \left(\begin{matrix}x \\ y\end{matrix}\right) = \left(\begin{matrix}2 \\ 1\end{matrix}\right)$

#### Explanation:

Write,
$x + 3 y = 5$
$x + 4 y = 6$
$\left(\begin{matrix}1 & 3 \\ 1 & 4\end{matrix}\right) \left(\begin{matrix}x \\ y\end{matrix}\right) = \left(\begin{matrix}5 \\ 6\end{matrix}\right)$
Let $A = \left(\begin{matrix}{a}_{11} & {a}_{12} \\ {a}_{21} & {a}_{22}\end{matrix}\right) = \left(\begin{matrix}1 & 3 \\ 1 & 4\end{matrix}\right) , \vec{x} = \left(\begin{matrix}x \\ y\end{matrix}\right) , \vec{R} = \left(\begin{matrix}5 \\ 6\end{matrix}\right)$

"we need to find "
${A}^{-} 1$ such that $I = {A}^{-} 1 A \text{ where } I = \left(\begin{matrix}1 & 0 \\ 0 & 1\end{matrix}\right)$ and we can write in vector matrix form:

$\vec{R} = A \cdot \vec{x}$ multiplying both sides by ${A}^{-} 1$
${A}^{-} 1 \cdot \vec{R} = {A}^{-} 1 A \cdot \vec{x} = I \cdot \vec{x}$
in our case:
${A}^{-} 1 \left(\begin{matrix}5 \\ 6\end{matrix}\right) = \left(\begin{matrix}1 & 0 \\ 0 & 1\end{matrix}\right) \left(\begin{matrix}x \\ y\end{matrix}\right)$
and the solution to $x , y$
$x = 5 \cdot a {'}_{11} + 6 \cdot a {'}_{12}$
$y = 5 \cdot a {'}_{21} + 6 \cdot a {'}_{22}$

but how do you find:
${A}^{-} 1 = \left(\begin{matrix}a {'}_{11} & a {'}_{12} \\ a {'}_{21} & a {'}_{22}\end{matrix}\right)$?
${A}^{-} 1 = \frac{1}{\det} \left(A\right) \cdot \left(\begin{matrix}{a}_{22} & - {a}_{12} \\ - {a}_{21} & {a}_{11}\end{matrix}\right)$ where
$\det \left(A\right) = \left({a}_{11} {a}_{22} - {a}_{12} {a}_{21}\right) = 4 - 3 = 1$
Thus ${A}^{-} 1 = \left(\begin{matrix}4 & - 3 \\ - 1 & 1\end{matrix}\right)$
$\left(\begin{matrix}x \\ y\end{matrix}\right) = \left(\begin{matrix}4 & - 3 \\ - 1 & 1\end{matrix}\right) \left(\begin{matrix}5 \\ 6\end{matrix}\right) = \left(\begin{matrix}2 \\ 1\end{matrix}\right)$