 
 
 
15.2.10  Adjoint matrix
The comatrix of a square matrix A of size n is the matrix
B defined by AB=det(A)I. The adjoint
matrix Q(x) of A is the comatrix of xI−A. It is a polynomial of degree
n−1 in x having matrix coefficients and satisfies:
| (xI−A)Q(x)=det(xI−A)I=P(x)I, | 
where P(x) is the characteristic polynomial of A.
Since the polynomial P(x)I−P(A) (with matrix coefficients) is
also divisible by x I−A (by algebraic identities), this means
that P(A)=0. We also have Q(x)=I xn−1+⋯+B0
where B0 is the comatrix of A (times −1 if n is odd).
The adjoint_matrix
command finds the characteristic polynomial and adjoint of a given matrix.
- 
adjoint_matrix takes
A, a square matrix.
- adjoint_matrix(A) returns the list of the
coefficients of P(x) (the characteristic polynomial of A), and the
list of the matrix coefficients of Q(x) (the adjoint matrix of A).
Examples
Let A=[
]. Input:
| adjoint_matrix([[4,1,-2],[1,2,-1],[2,1,0]]) | 
|  | | |  | ⎡ ⎢
 ⎢
 ⎣
 | ⎡ ⎣
 | 1,−6,12,−8 | ⎤ ⎦
 | , | ⎡ ⎢
 ⎢
 ⎣
 |  | , |  | , |  | ⎤ ⎥
 ⎥
 ⎦
 | ⎤ ⎥
 ⎥
 ⎦
 | 
 |  |  |  |  |  |  |  |  |  |  | 
 | 
Hence the characteristic polynomial is:
The determinant of A is equal to −P(0)=8.
The comatrix of A is equal to:
Hence the inverse of A is equal to:
The adjoint matrix of A is:
|  | | ⎡ ⎢
 ⎢
 ⎣
 | | x2−2 x+1 | x−2 | −2 x+3 |  | x−2 | x2−4 x+4 | −x+2 |  | 2 x−3 | x−2 | x2−6 x+7 | 
 | ⎤ ⎥
 ⎥
 ⎦
 | 
 | . | 
Let A=[
]. Input:
| adjoint_matrix([[4,1],[1,2]]) | 
|  | | |  | ⎡ ⎢
 ⎣
 | ⎡ ⎣
 | 1,−6,7 | ⎤ ⎦
 | , | ⎡ ⎢
 ⎣
 |  | , |  | ⎤ ⎥
 ⎦
 | ⎤ ⎥
 ⎦
 | 
 |  |  |  |  |  |  |  |  |  |  | 
 | 
Hence the characteristic polynomial P is:
The determinant of A is equal to P(0)=7.
The comatrix of A is equal to
Hence the inverse of A is equal to:
The adjoint matrix of A is:
 
 
