linalg::adjoint -- Adjoint of a
matrix
Introductionlinalg::adjoint(A) computes the adjoint
Adj(A) of the nxn matrix A. The
adjoint matrix satisfies the equation A*Adj(A) = det(A)*I,
where I is the n x n identity matrix.
Call(s)linalg::adjoint(A)
ParametersA |
- | a square matrix of a domain of category Cat::Matrix |
Returnsa matrix of the same domain type as A.
Related
Functions
DetailsA must be of category Cat::CommutativeRing.
Example
1We define a matrix over the rationals:
>> MatQ := Dom::Matrix( Dom::Rational ): A := MatQ( [[0, 2, 1], [2, 1, 0], [1, 0, 2]] )
+- -+
| 0, 2, 1 |
| |
| 2, 1, 0 |
| |
| 1, 0, 2 |
+- -+
Then the adjoint matrix of A is given
by:
>> Ad := linalg::adjoint(A)
+- -+
| 2, -4, -1 |
| |
| -4, -1, 2 |
| |
| -1, 2, -4 |
+- -+
We check the property of the adjoint matrix
Ad mentioned above:
>> A * Ad = linalg::det(A)*MatQ::identity(3)
+- -+ +- -+
| -9, 0, 0 | | -9, 0, 0 |
| | | |
| 0, -9, 0 | = | 0, -9, 0 |
| | | |
| 0, 0, -9 | | 0, 0, -9 |
+- -+ +- -+
BackgroundThe (j,i)-th cofactor of A is defined by A'[i,j] = (-1)^(i+j)*det(A(i|j)), where A(i|j) is the submatrix of A obtained from A by deleting the i-th row and j-th column.