Matrix Determinant by Diagonal Matrix
A matrix diagonal transformation method is preferred over minor or cofactor of matrix method while finding determinant of the matrix's size over 3x3. The matrix A is converted into Diagonal matrix D by elementary row operation or reduction and then product of main diagonal elements is called determinant of the matrix A. Read matrix A Convert matrix A into diagonal matrix D by applying Row operation or reduction technique Read Main Diagonal elements from D Determinant = product of Main Diagonal elements Algorithm steps for Determinant by Diagonal matrix Read matrix A a - element of the matrix A i,j - position of a element in the matrix for i=1 To N for j=1 To N if i not-equal j RowOperation .add(j,i ,-a ii /a ji ) end end end Determinant = a 11 x a 22 x ... x a nn Java program for a matrix Determinant by Diagonal matrix public class Determinant { Matrix mat; publ