# Finding the determinant of a matrix through row operations.

I am having a lot of trouble with this question and was hoping someone could tell me where I am going wrong.

So the question is to compute the determinant of the following matrix A by using row operations to transform it into a diagonal matrix.

\begin{pmatrix} -9 & 2 & -3 & -1 \\ 18 & -8 & 6 & -3 \\ 9 & 10 & 11 & 10 \\ 0 & -12 & 4 & -21 \\ \end{pmatrix}

I know that when I get the diagonal matrix, I just multiply the values of the diagonal to obtain the determinant of the diagonal matrix. Then I can use the rules of row operations and determinants to calculate the value of determinant A. So here is what I did, starting with matrix A, from above, and performing row operations.

1) R1+R3 -> R3

\begin{pmatrix} -9 & 2 & -3 & -1 \\ 18 & -8 & 6 & -3 \\ 0 & 12 & 8 & 9 \\ 0 & -12 & 4 & -21 \\ \end{pmatrix}

2) 2R1+R2 -> R2

\begin{pmatrix} -9 & 2 & -3 & -1 \\ 0 & -4 & 0 & -5 \\ 0 & 12 & 8 & 9 \\ 0 & -12 & 4 & -21 \\ \end{pmatrix}

3) 3R2+R3 -> R3

\begin{pmatrix} -9 & 2 & -3 & -1 \\ 0 & -4 & 0 & -5 \\ 0 & 0 & 8 & -6 \\ 0 & -12 & 4 & -21 \\ \end{pmatrix}

4) 3R2-R4 -> R4

\begin{pmatrix} -9 & 2 & -3 & -1 \\ 0 & -4 & 0 & -5 \\ 0 & 0 & 8 & -6 \\ 0 & 0 & -4 & 6 \\ \end{pmatrix}

5) R3+2R4->R4

\begin{pmatrix} -9 & 2 & -3 & -1 \\ 0 & -4 & 0 & -5 \\ 0 & 0 & 8 & -6 \\ 0 & 0 & 0 & 6 \\ \end{pmatrix}

So now I have my diagonal matrix, I can calculate the determinant to be 1728.

From my row operations and the rule that "adding a multiple of one row to another doesn't change the determinant" I thought that all my row operations performed on matrix A to obtain the diagonal matrix won't affect the the determinant of B. So I thought the determinant of A = determinant of B. But it seems that the determinant of matrix A = -864.

So, my question is, where did I go wrong, should there be a row operation equivalent to multiplying the the determinant of B by -1/2 that I missed?

• Step $4$: you multiply $R_4$ by $-1$, so the determinant gets a factor of $-1$. Step $5$: you multiply $R_4$ by $2$, so the determinant gets a factor of $\frac 12$. Commented Nov 13, 2016 at 2:44
• @BobbieD This also makes sense! Thank you for your help, I understand now!!
– melm
Commented Nov 13, 2016 at 2:51

Check your steps 4 and 5

Where you did 3R2 - R4 you should have done -3R2 + R4 and were you did R3 + 2R4 you should have done 0.5R3 + R4.

When performing gaussian elimination like you are, if you are to change the $i$-th row, then you have R$i$ + aRj for another row $j$ and some number $a$ that can be negative. You don't usually put the negative sign in front of the row you are changing. If you change a row in-place, that is, scale it by multiplying by a number $x$, then the determinant of the resulting matrix will have to be divided by that same $x$. Thus by computing 3R2 - R4 you are flipping the fourth row's sign, multiplying by $-1$ which will then have to be accounted for in the final determinant by dividing the determinant by $-1$. In the 5th step you scale R4 by 2, so you will have to divide the determinant by 2.

Having that said, it is generally advised to not multiply a row by itself because one can get lost on by how much it will have to divide (one then has to divide in the end because of how the the determinant is defined). It is usually better to instead sum a different multiple of the row you want to add. As you could see, both instances of your example could be "fixed" by changing the other scalar.

• I had absolutely NO idea this was a rule! Thank you sooo much this is so helpful! I've been in this class for 3 months and have never know this rule, yet I've never seemed to spot a mistake in my answers due to this error. Would you know if it has any effect on obtaining a reduced or even row echelon form of something? Have I just been extremely lucky to have it not affect my final answers in past questions?
– melm
Commented Nov 13, 2016 at 2:39
• @aa21 it is fixed now.
– RGS
Commented Nov 13, 2016 at 2:50
• This makes sense! Thank you!!
– melm
Commented Nov 13, 2016 at 2:50