Previous Up Next

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.

Examples

Let A=[

41−2
12−1
210

]. Input:

adjoint_matrix([[4,1,-2],[1,2,-1],[2,1,0]])
     
⎡
⎢
⎢
⎣
⎡
⎣
1,−6,12,−8⎤
⎦
,⎡
⎢
⎢
⎣
⎡
⎢
⎢
⎣
100
010
001
⎤
⎥
⎥
⎦
,
⎡
⎢
⎢
⎣
−21−2
1−4−1
21−6
⎤
⎥
⎥
⎦
,
⎡
⎢
⎢
⎣
1−23
−242
−3−27
⎤
⎥
⎥
⎦
⎤
⎥
⎥
⎦
⎤
⎥
⎥
⎦
          

Hence the characteristic polynomial is:

  P(x)=x3−6x2+12x−8.

The determinant of A is equal to −P(0)=8. The comatrix of A is equal to:

  B=Q(0)=
⎡
⎢
⎢
⎣
    1−23
−242
−3−27
⎤
⎥
⎥
⎦

Hence the inverse of A is equal to:

  
1
8
⎡
⎢
⎢
⎣
    1−23
−242
−3−27
⎤
⎥
⎥
⎦

The adjoint matrix of A is:

  
⎡
⎢
⎢
⎣
x2−2 x+1x−2−2 x+3
x−2x2−4 x+4−x+2
2 x−3x−2x2−6 x+7
⎤
⎥
⎥
⎦
.

Let A=[

41
12

]. Input:

adjoint_matrix([[4,1],[1,2]])
     
⎡
⎢
⎣
⎡
⎣
1,−6,7⎤
⎦
,⎡
⎢
⎣
⎡
⎢
⎣
10
01
⎤
⎥
⎦
,
⎡
⎢
⎣
−21
1−4
⎤
⎥
⎦
⎤
⎥
⎦
⎤
⎥
⎦
          

Hence the characteristic polynomial P is:

  P(x)=x2−6x+7.

The determinant of A is equal to P(0)=7. The comatrix of A is equal to

  Q(0)=−
⎡
⎢
⎣
−21
1−4
⎤
⎥
⎦

Hence the inverse of A is equal to:

  −
1
7
⎡
⎢
⎣
−21
1−4
⎤
⎥
⎦

The adjoint matrix of A is:

  − 
⎡
⎢
⎣
x−21
1x−4
⎤
⎥
⎦

Previous Up Next