Find the number of simple arithmetic operations one would need to perform to calculate the determinant of a general numerical matrix by the method of Cofactor or Laplace expansion along a particular row/column.
Details and Assumptions:
A simple arithmetic operation is one of Addition, Subtraction, Multiplication, Division.
As a few explicit examples, we need to perform operations to calculate determinant of a matrix, operations for a matrix, and operations for a matrix.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Generalization
We have to calculate- Δ n × n = ⎣ ⎢ ⎢ ⎢ ⎡ a 1 1 a 2 1 ⋮ a n 1 a 1 2 ⋱ … ⋱ a 1 n a n n ⎦ ⎥ ⎥ ⎥ ⎤ n × n Which is equal to- Δ n × n = ( a 1 1 × M 1 1 ) + ( a 1 2 × M 1 2 + ⋯ + ( a 1 n × M 1 n ) ) M 1 k is the determinent of cofactor matrix of a 1 k which is a ( n − 1 ) × ( n − 1 ) matrix.
Hence if we name our calculating function as
CalDet(n)
,We would get,
CalDet(n)= n*(CalDet(n-1)+1)+(n-1)=n*(CalDet(n-1)+2)-1
This is a recursive function with 'CalDet(1)=0` (we don't need to perform any arithmetic operation to calculate determinant of a 1 × 1 matrix!)
Which in python gives -
Explaination of
CalDet(n)= n*(CalDet(n-1)+1)+(n-1)
n (...there are n a 1 k s) × (
CalDet(n-1)
( ...number of operations needed to calculate determinant of [ M 1 k ] ( n − 1 ) × ( n − 1 ) ) +1 ( ...multiplication of a 1 k × M 1 k ) ) … this first term is for calculation of A 1 k + ( n − 1 ) ( . . . for ∑ A 1 k )