# Is the determinant equal to the product of the secondary diagonal if the matrix is triangular by columns?

The determinant of a matrix A is by definition the product of the elements of its main diagonal if the matrix is triangular by rows, i.e., the elements are $$0$$ when $$i>j$$.

Would the determinant be the product of the secondary diagonal if all elements are $$0$$ when $$i+j≤n$$?

This is what I mean by a triangular by columns matrix $$\begin{matrix} 0 & 0 & x^2 \\ 0 & y & y^2 \\ 1 & z & z^2 \\ \end{matrix}$$

• Yes (expand by the last row). Nov 24, 2019 at 17:25
• But the result seems to be the symmetric of the result, i.e., if the product of the secondary matrix is 6, the result is -6. Why is that? @Bernard Nov 24, 2019 at 17:30
• Because you have to take into account the alternation signs when you expand a determinant by row or a column. Nov 24, 2019 at 17:38
• Your example has non-zero elements in some locations where $j > i.$ I think the condition you want is "$0$ when $i+j\leq n,$ for $A$ an $n\times n$ matrix." Nov 24, 2019 at 17:59
• "The determinant of a matrix A is by definition the product of the elements of its main diagonal if the matrix is triangular by rows" I personally wouldn't say "by definition", although it's not a very difficult result to prove by using the definition. Nov 24, 2019 at 18:04

The determinant would be equal to either the product of the secondary diagonal or negative the product of the secondary diagonal, depending on the dimension of the matrix: $$\lvert A \rvert = \pm a_{n1} a_{(n-1)2} a_{(n-2)3} \cdots a_{1n}.$$

One way to show this is to reverse the order of the rows of your matrix, which is a permutation of rows (hence preserving the absolute value of the determinant) that converts your matrix into an upper triangular matrix. The main diagonal of this upper triangular matrix is composed of the elements on the secondary diagonal of your original matrix, and its product is the determinant of the upper triangular matrix.

The $$\pm$$ sign depends on the sign of the permutation of the rows, which you can determine by the minimum number of swaps required to move all rows to their final positions: the sign is positive if the number of swaps is even, negative if the number of swaps is odd.

For a $$2\times 2$$ matrix, you swap rows $$1$$ and $$2$$; one swap, so $$\lvert A\rvert = -a_{21}a_{12}.$$

For a $$3\times 3$$ matrix, you swap rows $$1$$ and $$3$$; one swap, so $$\lvert A\rvert = -a_{31}a_{22}a_{13}.$$

For a $$4\times 4$$ matrix, you swap rows $$1$$ and $$4$$ and swap rows $$2$$ and $$3$$; two swaps, so $$\lvert A\rvert = a_{41}a_{32}a_{23}a_{14}.$$

For a $$5\times 5$$ matrix, you swap rows $$1$$ and $$5$$ and swap rows $$2$$ and $$4$$; two swaps, so $$\lvert A\rvert = a_{51}a_{42}a_{33}a_{24}a_{15}.$$

Every time you increase the number of rows by $$4$$ you incur two more swaps, so the sign for an $$(n+4)\times(n+4)$$ matrix is the same as for an $$n\times n$$ matrix, and so the pattern repeats: $$-,-,+,+,-,-,+,+,\ldots.$$

• So does that mean if the matrix has an odd dimension is minus and even is plus? Nov 24, 2019 at 18:11
• Minus or plus depends on the sign of the permutation of the rows. Try it with a $2\times2$ matrix, $3\times3$, and $4\times4$, and you'll see it's not just whether $n$ is even or odd. Nov 24, 2019 at 18:22

No. "Triangular by rows" is usually called "upper triangular", and "triangular by columns" is "lower triangular". In both cases the determinant is the product of the elements on the main diagonal.

• I didn't mean it like that; please see my edit Nov 24, 2019 at 17:38
• I've edited with the explanation Nov 24, 2019 at 17:42