Inverting the Coefficient Matrix: Solving Systems of Equations

AI Thread Summary
The discussion focuses on solving a system of equations using the inverse of the coefficient matrix. The initial attempt yielded incorrect values for x and y, which were confirmed by substituting them back into the original equations. Participants pointed out errors in calculating the determinant and the inverse matrix, emphasizing the importance of accuracy in these calculations. They recommended using augmented matrices and row operations as a more reliable method for finding the inverse. The conversation highlights the need for careful verification of results in matrix operations.
Danatron
Messages
25
Reaction score
0
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
 
Physics news on Phys.org
sorry guys, i didn't type the matrices out like that! is there another way to type out a matrix on here?
 
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?
 
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:
  • Like
Likes 1 person
Danatron said:
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

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,
<br /> \frac{a}{b} + \frac{c}{d}\frac{e}{f} = \frac{adf + bce}{bdf},
etc.
 
Danatron said:
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

There is a special rule for computing the inverse of a 2x2 matrix; it is worth remembering.
{\begin{bmatrix}a &amp; b \\ c &amp; d\end{bmatrix}}^{-1}<br /> = \frac{1}{D} \begin{bmatrix}d &amp; -b \\ -c &amp; a\end{bmatrix}
where
D = \left| \begin{array}{cc}a &amp; b \\c &amp; 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.
 
HallsofIvy said:
Writing this using Latex, your matrix equation is
\begin{bmatrix}2 &amp; 4 \\ -1 &amp; -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 &amp; 4 \\ -1 &amp; -1\end{bmatrix} is (1/6)\begin{bmatrix}-1 &amp; -4 \\ 1 &amp; 2\end{bmatrix}. It isn't as, again, you could have checked:
\begin{bmatrix}2 &amp; 4 \\ -1 &amp; -1 \end{bmatrix}\begin{bmatrix}-\frac{1}{6} &amp; -\frac{2}{3} \\ \frac{1}{6} &amp; \frac{1}{3}\end{bmatrix}= \begin{bmatrix}-\frac{2}{6}+ \frac{4}{6} &amp; -\frac{4}{3}+ \frac{4}{3} \\ \frac{1}{6}- \frac{1}{6} &amp; \frac{2}{3}- \frac{1}{3}\end{bmatrix}= \begin{bmatrix}-\frac{1}{3} &amp; 0 \\ 0 &amp; \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.

Thanks for the help.

Just one question, I am probably wrong but anyhow if i don't ask i won't learn.

If i plug the x= -1/3 & y= 1/3 into the equation to check then I am don't get -9?
2(-1/3) + 4(1/3) = 0.66666 recurring

what am i doing wrong?
 
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
so x= -1/3 and y= 1/3?
 
  • #11
"If i plug the x= -1/3 & y= 1/3 into the equation to check then I am don't get -9?
2(-1/3) + 4(1/3) = 0.66666 recurring"

You have already concluded that this answer is wrong.

Please read what was suggested by LCKurtz.
 
Back
Top