I really hate matrices sometimes.

  • Thread starter Thread starter jernobyl
  • Start date Start date
  • Tags Tags
    Matrices
Click For Summary

Homework Help Overview

The discussion revolves around expressing a system of linear equations in matrix form and solving it, specifically using the inverse of a matrix. The original poster expresses frustration with the process and the accuracy of their results.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • The original poster attempts to convert the equations into matrix form and calculate the inverse of the matrix to find the solution. They express uncertainty about their calculations and suspect a sign error in their determinant calculation.
  • Some participants question the method of solving the system, suggesting that row reduction of the augmented matrix might be simpler and more efficient.
  • Others raise questions about the validity of certain operations in matrix manipulation, particularly regarding row operations and their effects on determinants.

Discussion Status

Participants have identified a potential error in the original poster's determinant calculation, which seems to have resolved their issue. There is an ongoing exploration of alternative methods for solving the system of equations, with some participants sharing insights on row reduction techniques.

Contextual Notes

The original poster mentions that they are new to matrices and are working on coursework, which may impose certain constraints on their approach. There is also a reference to differing levels of confidence in various methods of solving systems of equations.

jernobyl
Messages
31
Reaction score
0

Homework Statement



Express the following equations in the matrix form AX=B. Determine the inverse of A and hence solve the equations.

[tex]4x-3y+z=11[/tex]

[tex]2x+y-4z=-1[/tex]

[tex]x+2y-2z=1[/tex]

Homework Equations



Not really applicable.

The Attempt at a Solution



A bit of background, this is for a piece of coursework when we were just starting to learn about matrices and their uses, which deals with solving groups of equations by changing them into matrix form and solving them that way. So it's not very advanced. It's just annoying.

Basically I've done the entirety of the problem, I come to the end and the answers aren't right. It's a Hellishly long process and I've done it five times now and each time I get a different incorrect answer and it's driving me up the wall. I just KNOW I've got ONE sign wrong somewhere and it's throwing the whole damn thing off. I hope someone can point out where I've gone wrong.

Oh, the answer is meant to come out, [tex]x = 3, y = 1, z = 2[/tex]; I've been getting weird fractional answers. Anyway.

Right, so changing the equations into AX=B form:

[tex]\left(\begin{array}{ccc}4&-3&1\\2&1&-4\\1&2&-2\end{array}\right)\left(\begin{array}{c}x\\y\\z\end{array}\right) = \left(\begin{array}{c}11\\-1\\1\end{array}\right)[/tex]

So we know that:

[tex]X=A^{-1}B[/tex]

So my next aim is to calculate [tex]A^{-1}[/tex].

[tex]A^{-1}=\frac{1}{det(A)}adj(A)[/tex]

[tex]det(A) = (4)\left|\begin{array}{cc}1&-4\\2&-2\end{array}\right|-(-3)\left|\begin{array}{cc}2&-4\\1&-2\end{array}\right|+(1)\left|\begin{array}{cc}2&1\\1&2\end{array}\right|[/tex]

[tex]=(4)(6)-(-3)(0)-(1)(3)[/tex]

[tex]=24-0-3[/tex]

[tex]=21[/tex]

So that's fair enough. The determinant is 21. God knows if it actually is or not but following my calculations that's what it is. Now, the matrix of cofactors:

[tex]C = \left(\begin{array}{ccc}\left|\begin{array}{cc}1&-4\\2&-2\end{array}\right|&-\left|\begin{array}{cc}2&-4\\1&-2\end{array}\right|&\left|\begin{array}{cc}2&1\\1&2\end{array}\right|\\\\-\left|\begin{array}{cc}-3&1\\2&-2\end{array}\right|&\left|\begin{array}{cc}4&1\\1&-2\end{array}\right|&-\left|\begin{array}{cc}4&-3\\1&2\end{array}\right|\\\\\left|\begin{array}{cc}-3&1\\1&-4\end{array}\right|&-\left|\begin{array}{cc}4&1\\2&-4\end{array}\right|&\left|\begin{array}{cc}4&-3\\2&1\end{array}\right|\end{array}\right) = \left(\begin{array}{ccc}6&0&3\\-4&-9&-11\\11&18&10\end{array}\right)[/tex]

[tex]adj(A)=C^T=\left(\begin{array}{ccc}6&-4&11\\0&-9&18\\3&-11&10\end{array}\right)[/tex]

[tex]A^{-1} = \frac{1}{21}\left(\begin{array}{ccc}6&-4&11\\0&-9&18\\3&-11&10\end{array}\right) = \left(\begin{array}{ccc}\frac{2}{7}&-\frac{4}{21}&\frac{11}{21}\\\\0&-\frac{3}{7}&\frac{6}{7}\\\\\frac{1}{7}&-\frac{11}{21}&\frac{10}{21}\end{array}\right)[/tex]

[tex]X=A^{-1}B = \left(\begin{array}{ccc}\frac{2}{7}&-\frac{4}{21}&\frac{11}{21}\\\\0&-\frac{3}{7}&\frac{6}{7}\\\\\frac{1}{7}&-\frac{11}{21}&\frac{10}{21}\end{array}\right)\left(\begin{array}{c}11\\-1\\1\end{array}\right)[/tex]

Which actually gives you the answers [tex]x=\frac{27}{7}, y=\frac{9}{7}, z=\frac{58}{21}[/tex]...none of which are right, obviously.

I know there's a lot of information above but I could really do with someone with a sharper eye than mine (bear in mind it's now nearly 6am and I've been up all night!) to find where I've made my little error leading to a grand finale of chaos! Many thanks to anyone who looks at this! I'm off to my bed for now!
 
Last edited:
Physics news on Phys.org
OK, so there's a sign error in the 3rd term when calculating the determinant. It should be 24 - 0 + 3 = 27
 
And you know what? That solves the whole thing. I knew it. One sign off. Thanks so much for noticing, I'd never have gotten it! I need to go be dead now. :S
 
Is that the only way you have learned to solve a system of equations? Row reduction of the augmented matrix is much simpler (in this problem it doesn't involve any fractions!). Hopefully you will learn that soon.
 
Hi, um, if "row reduction of the augmented matrix" can also be called "elementary row operations" (as I'm reading in my notes) then yes, we have learned that, but it was kind of forgotten about, being hailed as a long-winded and quite inefficient way of finding the inverses of matrices, and therefore I'm not very confident about how to do it.
 
"Long winded"! "Difficult"! How dare you! It is the simplest way to find determinants, inverses, or, for that matter, just solving equations!

In this case, you can write the "augmented" matrix as
[tex]\left(\begin{array}{cccc}4&-3&1&11\\2&1&-4&-1\\1&2&-2&1\end{array}\right)[/tex]
The first row operation I would use is to swap the first and third rows (that's not necessary but it simplifies the arithmetic):
[tex]\left(\begin{array}{cccc}1&2&-2&1\\2&1&-4&-1\\4&-3&1&11\end{array}\right)[/tex]
Now, in order to get "1 0 0" as the first column, subtract twice the first row from the second row and four times the first row from the third row:
[tex]\left(\begin{array}{cccc}1&2&-2&1\\0&-3&0&-3\\0&-11&9&7\end{array}\right)[/tex]
Divide the second row by -3 (to get a 1 at the "pivot"), subtract twice that new second row from the first row and add 11 times the new second row to the third row:
[tex]\left(\begin{array}{cccc}1&0&-2&-1\\0&1&0&1\\0&0&9&18\end{array}\right)[/tex]
Finally, divide the third row by 9 and add twice the third row to the first row:
[tex]\left(\begin{array}{cccc}1&0&0&3\\0&1&0&1\\0&0&1&2\end{array}\right)[/tex]
Now you can read off the solution: x= 3, y= 1, z= 2.

We didn't have to find either the inverse matrix nor the determinant to solve that. If we did want to find the inverse matrix, we would replace that fourth column by the identity matrix. The same row operations that change the matrix A into the identity matrix change the identity matrix into A-1.

But even finding the determinant is easy this way: just keep track of the "swaps" and "divisions". We swapped two rows: that will multiply the determinant by -1. We divided one two by -3. To "get it back", we must multiply the determinant by -3. We divided a row by 9. To "get it back", we must multiply the determinant by 9. Since the determinant of the final matrix (the identity matrix) is obviously 1, the original matrix had determinant (-1)(-3)(9)= 27.
 
Sorry to bring back a long dead thread.
I found HallsofIvy's method fascinating. I haven't studied agumented matrices so far, so I have a few questions regarding this method.
1) Are operations like subtracting constant times a row from another row allowed in matrices?
2)When we divide the second row by -3 don't we have to multipy the matrix by -3 as well (like we do in determinants)?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
6
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
0
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
3
Views
4K