M BUZZ CRAZE NEWS
// news

Solving a matrix with one variable

By Daniel Rodriguez
$\begingroup$

I have a system of equations as follows:

$$1x + hy = -5$$

$$2x - 8y = 6$$

My question is how do I work with such a variable in a matrix? Thank you.

$\endgroup$ 5

1 Answer

$\begingroup$

You can write the system as $\begin{bmatrix} 1&h \\ 2&-8\\ \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} -5 \\ 6 \end{bmatrix}$

Then, when $\begin{bmatrix} 1&h \\ 2&-8\\ \end{bmatrix} $ is invertible ($det(\begin{bmatrix} 1&h \\ 2&-8\\ \end{bmatrix} ) = -8-2h \neq 0$), you can invert the matrix and left multiply both sides by it (the inverse of a $2 \times 2$ matrix is well known). This gives you $\begin{bmatrix} x \\y \end{bmatrix} = \begin{bmatrix} 1&h \\ 2&-8\\ \end{bmatrix}^{-1} \begin{bmatrix} -5 \\ 6 \end{bmatrix}$.

In the case where $det(\begin{bmatrix} 1&h \\ 2&-8\\ \end{bmatrix} ) =0$, the equations are inconsistent (the left hand side of the first equation is half of the left hand side of the second equation, and the right hand sides do not follow this) and there is no solution.

For reference, $\begin{bmatrix} a & b \\ c & d \end{bmatrix}^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -c \\ -b & a \end{bmatrix}$.

Alternatively, you can consider it as an augmented system of equations $\begin{bmatrix} 1 & h & | & -5\\ 2 & -8 &| & 6 \end{bmatrix}$ and apply Gaussian Elimination.

If you don't have to use matrices, you can just solve one equation for $x$ or $y$, plug it into the other, solve for the other variable (in terms of $h$) , then plug that back into either equation and solve for the remaining variable.

$\endgroup$ 2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy