TOPICS
Search

Cofactor


Given a factor a of a number n=ab, the cofactor of a is b=n/a.

A different type of cofactor, sometimes called a cofactor matrix, is a signed version of a minor M_(ij) defined by

 C_(ij)=(-1)^(i+j)M_(ij)

and used in the computation of the determinant of a matrix A according to

 |A|=sum_(i=1)^ka_(ij)C_(ij).

The cofactor can be computed in the Wolfram Language using

  Cofactor[m_List?MatrixQ, {i_Integer, j_Integer}] :=
    (-1)^(i+j) Det[Drop[Transpose[
      Drop[Transpose[m], {j}]], {i}
    ]]

which is the equivalent of the (i,j)th component of the CofactorMatrix defined below.

  MinorMatrix[m_List?MatrixQ] :=
    Map[Reverse, Minors[m], {0, 1}]
  CofactorMatrix[m_List?MatrixQ] :=
    MapIndexed[#1 (-1)^(Plus @@ #2)&,
      MinorMatrix[m],{2}]

Cofactors can be computed using Cofactor[m, {i, j}] in the Wolfram Language package Combinatorica` .


See also

Determinant, Determinant Expansion by Minors, Minor

Explore with Wolfram|Alpha

References

Lichtblau, D. "Symbolic FAQ." http://library.wolfram.com/infocenter/Conferences/325.Muir, T. A Treatise on the Theory of Determinants. New York: Dover, p. 54, 1960.Skiena, S. Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Reading, MA: Addison-Wesley, p. 235, 1990.

Referenced on Wolfram|Alpha

Cofactor

Cite this as:

Weisstein, Eric W. "Cofactor." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Cofactor.html

Subject classifications