# Inverse coefficient matrix

1. Jun 1, 2014

### Danatron

Solve the following system of equations using the inverse of the coefficient matrix,
2x + 4y = -9
-x - y = 2

My attempt-

[2 4 [x = -9
-1 -1] y] = 2
|A| x b

|A| = -2-4=-6

[x = 1/-6 [-1 -4 [-9 1/-6 [ 1 = 0.03
y] = 1 2] 2] -5] = 0.166666

Would someone be able to confirm if the answer is correct please???

Thank you

2. Jun 1, 2014

### Danatron

sorry guys, i didn't type the matrices out like that! is there another way to type out a matrix on here?

3. Jun 1, 2014

### hilbert2

You can add matrices to the text with LaTeX commands. For example: $\left(\begin{smallmatrix}2&4\\-1&-1\end{smallmatrix}\right)$. Right click on my matrix and choose "Show math as > TeX commands" to see how that is written in LaTeX code.

The idea in inverting the matrix is to form the double-wide matrix $\left(\begin{smallmatrix}2&4&|\\-1&-1&|\end{smallmatrix}\begin{smallmatrix}1&0\\0&1\end{smallmatrix}\right)$ and apply row operations until the left side becomes the identity matrix and the right side becomes the matrix inverse. Have you been taught how to apply matrix row operations in solving linear systems?

4. Jun 1, 2014

### HallsofIvy

Writing this using Latex, your matrix equation is
$$\begin{bmatrix}2 & 4 \\ -1 & -1 \end{bmatrix}\begin{bmatrix}x\\ y\end{bmatrix}= \begin{bmatrix}-9 \\ 2\end{bmatrix}$$

You give your solution as x= 0.03, y= 0.16666.

It's easy enough to check that your self isn't it?
2x+ 4y= 2(0.03)+ 4(0.1666)= 0.06+ 0.66664= 0.72664, not -9! (Not even close.)

You seem to be under the impression that the inverse matrix to $\begin{bmatrix}-2 & 4 \\ -1 & -1\end{bmatrix}$ is $(1/6)\begin{bmatrix}-1 & -4 \\ 1 & 2\end{bmatrix}$. It isn't as, again, you could have checked:
$$\begin{bmatrix}2 & 4 \\ -1 & -1 \end{bmatrix}\begin{bmatrix}-\frac{1}{6} & -\frac{2}{3} \\ \frac{1}{6} & \frac{1}{3}\end{bmatrix}$$$$= \begin{bmatrix}-\frac{2}{6}+ \frac{4}{6} & -\frac{4}{3}+ \frac{4}{3} \\ \frac{1}{6}- \frac{1}{6} & \frac{2}{3}- \frac{1}{3}\end{bmatrix}$$$$= \begin{bmatrix}-\frac{1}{3} & 0 \\ 0 & \frac{1}{3} \end{bmatrix}$$
NOT the identity matrix (though pretty close)!

Looks to me like you calculated the determinant wrong. Be careful with the signs.

While your method of finding the determinant and cofactors will work to find the inverse matrix (it was the first method I learned), using the "augmented matrix" and row operations, as Hilbert2 suggests, is much easier and less error prone.

Last edited by a moderator: Jun 1, 2014
5. Jun 1, 2014

### Ray Vickson

In small problems done by hand (and when all input data are rational numbers), avoid decimals and use rationals instead. So, write 1/6 instead of 0.16666, etc. It is easily do-able using a hand-held calculator: for example,
$$\frac{a}{b} + \frac{c}{d}\frac{e}{f} = \frac{adf + bce}{bdf},$$
etc.

6. Jun 1, 2014

### Ray Vickson

There is a special rule for computing the inverse of a 2x2 matrix; it is worth remembering.
$${\begin{bmatrix}a & b \\ c & d\end{bmatrix}}^{-1} = \frac{1}{D} \begin{bmatrix}d & -b \\ -c & a\end{bmatrix}$$
where
$$D = \left| \begin{array}{cc}a & b \\c & d\end{array} \right| = ad - bc$$
is the determinant of the matrix.

In other words, you get the inverse by swapping the diagonal elements, changing the signs of the off-diagonal elements, and dividing by the determinant.

7. Jun 1, 2014

8. Jun 2, 2014

### Danatron

Thanks for the help.

Just one question, im probably wrong but anyhow if i dont ask i wont learn.

If i plug the x= -1/3 & y= 1/3 into the equation to check then im dont get -9???
2(-1/3) + 4(1/3) = 0.66666 recurring

what am i doing wrong?

9. Jun 2, 2014

### LCKurtz

Several posters have told you what you have wrong. You calculated the determinant of coefficients wrong.$$\left | \begin{array}{cc} -2&4\\ -1&-1 \end{array}\right |= \text{?}$$

10. Jun 2, 2014

### Danatron

so x= -1/3 and y= 1/3?

11. Jun 2, 2014

### mafagafo

"If i plug the x= -1/3 & y= 1/3 into the equation to check then im dont get -9???
2(-1/3) + 4(1/3) = 0.66666 recurring"