determinant#

DCM.determinant#

Determinant of the DCM.

Given a direction cosine matrix \(\mathbf{R}\), its determinant \(|\mathbf{R}|\) is found as:

\[\begin{split}|\mathbf{R}| = \begin{vmatrix}r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33}\end{vmatrix}= r_{11}\begin{vmatrix}r_{22} & r_{23}\\r_{32} & r_{33}\end{vmatrix} - r_{12}\begin{vmatrix}r_{21} & r_{23}\\r_{31} & r_{33}\end{vmatrix} + r_{13}\begin{vmatrix}r_{21} & r_{22}\\r_{31} & r_{32}\end{vmatrix}\end{split}\]

where the determinant of \(\mathbf{B}\in\mathbb{R}^{2\times 2}\) is:

\[\begin{split}|\mathbf{B}|=\begin{vmatrix}b_{11}&b_{12}\\b_{21}&b_{22}\end{vmatrix}=b_{11}b_{22}-b_{12}b_{21}\end{split}\]

All matrices in SO(3), to which direction cosine matrices belong, have a determinant equal to \(+1\).

Returns:

Determinant of the DCM.

Return type:

float

Examples

>>> R = DCM(rpy=[10.0, -20.0, 30.0])
>>> R.view()
DCM([[ 0.92541658, -0.31879578, -0.20487413],
     [ 0.16317591,  0.82317294, -0.54383814],
     [ 0.34202014,  0.46984631,  0.81379768]])
>>> R.determinant
1.0000000000000002