This method uses determinants to find the solution of a linear system. There are two kinds of determinants. One is the determinant of the coefficients matrix denoted by Δ. Other are the determinants of matrices formed by replacing a single column with the constant vector, if column 1 is replaced then the determinant is denoted by Δ1 and similarly Δ2, Δ3 etc.
After calculating the determinants we can get the solution as x1=Δ1/Δ,x2=Δ2/Δ and so on.
This method is also known as Cramer's rule as it was proposed by Gabriel Cramer.
The time complexity of this method is O(N4). This is because we need to calculate N determinants and it requires O(N3) to calculate the determinant of a matrix. The space complexity is O(N2).