# Thread: Cramer's Rule and Determinants

1. ## Cramer's Rule and Determinants

I am to solve the following using Cramer's rule:

-x1 - 4x2 + 2x3 + x4 = -32
2x1 - x2 + 7x3 + 9x4 = 14
-x1 + x2 + 3x3 + x4 = 11
x1 - 2x2 + x3 - 4x4 = -4

I know x1 = [det(A1)]/[det(A)]

but I'm not sure what the best approach is to find the determinant of a 4x4 matrix, because cofactor expansion takes a very long time, would reducing the matrix to a triangular matrix be the best approach?

Thanks

2. Originally Posted by Adrian
I am to solve the following using Cramer's rule:

-x1 - 4x2 + 2x3 + x4 = -32
2x1 - x2 + 7x3 + 9x4 = 14
-x1 + x2 + 3x3 + x4 = 11
x1 - 2x2 + x3 - 4x4 = -4

I know x1 = [det(A1)]/[det(A)]

but I'm not sure what the best approach is to find the determinant of a 4x4 matrix, because cofactor expansion takes a very long time, would reducing the matrix to a triangular matrix be the best approach?

Thanks
i think it would be almost the same amount of work. it may be a little, just a little less work to transform the matrices into triangular matrices. do as you wish, if you want to use cofactor expansion method, expand along the first column

3. So for cofactor expansion I should find the detA to start off, but I'm not sure how to find the determinant of a 4x4 matrix?

-1 -4 2 1
2 -1 7 9
-1 1 3 1
1 -2 1-4

Do I find the determinants of each of the 3x3 matrices I am left with after going through each of the numbers in column 1?

If so, I should start at the -1 in Row 1 Column 1
That leaves me with:
-1 7 9
1 3 1
-2 1 -4
and the determinant is -1(-12-2) + -7(-4+2) + 9(1+6) = 91

Then move on to the 2nd number in column 1 of the 4x4 matrix?
That leaves me with:
-4 2 1
1 3 1
-2 1 -4
And find the determinant of that.

Then do the same thing with the -1 in Row 2 and the 1 in Row 4 of column 1 of the 4x4 matrix.

If I am correct so far, after going through all 4 numbers in Column 1 would I add the results of their determinants together? And this would be my determinant of the 4x4 matrix?

Thanks, but if I can learn to find the determinant of a 4x4 matrix then I should be able to deal with this problem.

4. Originally Posted by Adrian
So for cofactor expansion I should find the detA to start off, but I'm not sure how to find the determinant of a 4x4 matrix?

-1 -4 2 1
2 -1 7 9
-1 1 3 1
1 -2 1-4

Do I find the determinants of each of the 3x3 matrices I am left with after going through each of the numbers in column 1?

If so, I should start at the -1 in Row 1 Column 1
That leaves me with:
-1 7 9
1 3 1
-2 1 -4
and the determinant is -1(-12-2) + -7(-4+2) + 9(1+6) = 91

Then move on to the 2nd number in column 1 of the 4x4 matrix?
That leaves me with:
-4 2 1
1 3 1
-2 1 -4
And find the determinant of that.

Then do the same thing with the -1 in Row 2 and the 1 in Row 4 of column 1 of the 4x4 matrix.

If I am correct so far, after going through all 4 numbers in Column 1 would I add the results of their determinants together? And this would be my determinant of the 4x4 matrix?

Thanks, but if I can learn to find the determinant of a 4x4 matrix then I should be able to deal with this problem.
if what you're saying is this, then you are correct.

$\left| \begin{array}{cccc} -1 & -4 & 2&1 \\ 2& -1& 7& 9 \\ -1 &1 &3 &1 \\ 1& -2& 1&-4 \end{array} \right| = - \left| \begin{array}{ccc} -1&7 &9 \\ 1& 3& 1\\ -2& 1&-4 \end{array} \right| - 2 \left| \begin{array}{ccc} -4& 2& 1 \\ 1& 3& 1\\ -2& 1&-4 \end{array} \right|$ $- \left| \begin{array}{ccc} -4& 2& 1\\ -1& 7& 9\\ -2& 1&-4 \end{array} \right| - \left| \begin{array}{ccc} -4& 2& 1\\ -1& 7& 9\\ 1& 3& 1\end{array} \right|$

5. And inside each of those 3x3 matrices I have to find the determinant correct?

Yes that is what I was saying except I forgot the scalars in front of each 3x3 matrix, although may I ask why the scalars 2 and 1 are negative in your solution. They are the 5th and 13th numbers in the 4x4 matrix meaning they should both be positive and not negative shouldn't it? I thought it went like this for a 4x4 matrix
+ - + -
+ - + -
+ - + -
+ - + -

I know 3x3 matrices go like this:
+ - +
- + -
+ - +

6. Originally Posted by Adrian
And inside each of those 3x3 matrices I have to find the determinant correct?

Yes that is what I was saying except I forgot the scalars in front of each 3x3 matrix, although may I ask why the scalars 2 and the 1 are negative in your solution. They are the 5th and 13th numbers in the 4x4 matrix meaning they should both be positive and not negative shouldn't it? I thought it went like this for a 4x4 matrix
+ - + -
+ - + -
+ - + -
+ - + -
no, you always use the checkerboard pattern, starting with a + at the top left, so the sign structure for 4x4 matrices are:

+ - + -
- + - +
+ - + -
- + - +

I know 3x3 matrices go like this:
+ - +
- + -
+ - +
yes

7. Alright, that makes sense. Thanks a lot, looks like I'll be able to finish this problem now, although finding the determinant of 4 various 4x4 matrices for Cramer's Rule should take quite some time.

Thanks again

8. Originally Posted by Adrian
Alright, that makes sense. Thanks a lot, looks like I'll be able to finish this problem now, although finding the determinant of 4 various 4x4 matrices for Cramer's Rule should take quite some time.

Thanks again
indeed, it will take long. good luck