I really hate matrices sometimes.

  • Thread starter jernobyl
  • Start date
  • Tags
    Matrices
In summary, the problem involves solving a system of equations by expressing them in matrix form and finding the inverse of the matrix to find the solution. The process involves calculating the determinant and using elementary row operations. The person had difficulty finding the correct answer due to a sign error in the determinant calculation. An easier method for solving the problem is suggested, involving elementary row operations on the augmented matrix.
  • #1
jernobyl
31
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
  • #2
OK, so there's a sign error in the 3rd term when calculating the determinant. It should be 24 - 0 + 3 = 27
 
  • #3
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
 
  • #4
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.
 
  • #5
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.
 
  • #6
"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.
 
  • #7
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)?
 

1. Why do people hate matrices?

Many people find matrices difficult to understand and manipulate, leading to frustration and dislike.

2. Is it necessary to learn matrices in science?

Yes, matrices are a fundamental tool in many scientific fields, such as physics, engineering, and computer science.

3. How can I improve my understanding of matrices?

Practice and repetition can help improve understanding of matrices. Seeking help from a tutor or attending a workshop may also be beneficial.

4. What are some common applications of matrices in science?

Matrices are commonly used in data analysis, modeling and simulation, and solving systems of equations in science.

5. Are there any shortcuts or tricks to make working with matrices easier?

Yes, there are certain rules and properties of matrices that can be used to simplify calculations and manipulations. It is important to familiarize yourself with these rules and practice using them.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
528
  • Calculus and Beyond Homework Help
Replies
0
Views
144
  • Calculus and Beyond Homework Help
Replies
14
Views
733
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
778
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
539
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
940
Back
Top