\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
det_by_minor¶
View page sourceDeterminant Using Expansion by Minors¶
ell¶
We use \(\ell\) to denote the row and column dimension of the square matrix under consideration.
Algorithm¶
This algorithm computes \(|A|\) the determinant of a square matrix \(A \in \B{R}^{\ell \times \ell}\) . In the special case where ell is one, the determinant is just the element of the matrix. Otherwise, the determinant is computed using the formula
where the last term is + (-) if ell is odd (even) and \(A(i,j) \in \B{R}^{(\ell-1) \times (\ell-1)}\) is the \((i,j)\) minor of A; i.e., the square sub-matrix formed by deleting the i-th row and j-th column of A .
option¶
The only option used by this algorithm is n_arg ; see below:
n_arg¶
This is the number of arguments to the algorithm which is the number of elements in the matrix; i.e., \(\ell^2\) . There is an assert checking that n_arg > 0.
n_other¶
This option is not used except that it may be checked to make sure it is zero.
Implementation¶
Derivative¶
The partial derivative of \(|A|\) with respect to the \((i,j)\)-th element \(A_{i,j}\) is