Algosim documentation: AdjugateMatrix

AdjugateMatrix

Computes the adjugate matrix (classical adjoint) of a square matrix.

Syntax

Description

If A is a square matrix, then AdjugateMatrix(A) returns the adjugate matrix of A, that is, the transpose of the cofactor matrix of A. In other words,

AdjugateMatrix(A) =

  = transpose(matrix(compute(cofactor(A, i, j),
    i, 1, size(A).rows, j, 1, size(A).cols)))
  = transpose(matrix(compute((−1)^(i + j) ⋅ minor(A, i, j),
    i, 1, size(A).rows, j, 1, size(A).cols)))
  = transpose(matrix(compute((−1)^(i + j) ⋅ det(SubmatrixByRemoval(A, i, j)),
    i, 1, size(A).rows, j, 1, size(A).cols))).

Examples

A ≔ ❨❨4, 1, 2, 3❩, ❨6, 1, 2, 3❩, ❨7, 6, 5, 0❩, ❨1, 2, 1, 6❩❩
⎛4  1  2  3⎞
⎜6  1  2  3⎟
⎜7  6  5  0⎟
⎝1  2  1  6⎠
adj ≔ AdjugateMatrix(A)
⎛ −54    54     0     0⎞
⎜−102    42    18    30⎟
⎜ 198  −126     0   −36⎟
⎝  10    −2    −6    14⎠
defuzz(A⋅adj)
⎛108    0    0    0⎞
⎜  0  108    0    0⎟
⎜  0    0  108    0⎟
⎝  0    0    0  108⎠
det(A)
108

See also