# 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$. – Bobbie D Nov 13 '16 at 2:44
• @BobbieD This also makes sense! Thank you for your help, I understand now!! – melm Nov 13 '16 at 2:51

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.