lines 12-69 of file: xrst/algorithm.xrst {xrst_begin det_by_minor} {xrst_spell th } Determinant Using Expansion by Minors ##################################### ell *** We use :math:`\ell` to denote the row and column dimension of the square matrix under consideration. Algorithm ********* This algorithm computes :math:`|A|` the determinant of a square matrix :math:`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 .. math:: | A | = + | A(0,0) | - | A(0,1) | + | A(0,2) | \cdots \pm | A(0,\ell-1) | where the last term is + (-) if *\ell* is odd (even) and :math:`A(i,j) \in \B{R}^{(\ell-1) \times (\ell-1)}` is the :math:`(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., :math:`\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 ============== :ref:`cpp_det_by_minor-name` , :ref:`py_det_by_minor-name` . Derivative ********** The partial derivative of :math:`|A|` with respect to the :math:`(i,j)`\ -th element :math:`A_{i,j}` is .. math:: \frac{ \partial |A| }{ \partial A_{i,j} } = (-1)^{i+j} | A(i,j) | {xrst_end det_by_minor}