Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I've been looking for a function that helps me get the adjoint matrix o a given one, I found that you can get the cofactors of a matrix but only by using the "Combinatorica" package, which I couldn't get.

If you know any command or if you know effective ways of creating a function that does this, please help me.

share|improve this question
Can you explain what is the "adjunct"? –  Szabolcs Nov 28 '13 at 1:30
@Szabolcs Adjoint - in Spanish is "Adjunta" –  belisarius is forth Nov 28 '13 at 1:33
Take a look at the help for Minors[], under "Applications" –  belisarius is forth Nov 28 '13 at 1:38
I've found the translation "adjunt" so I wasn't sure it was the same "adjoint" –  DavidBecharaSenior Nov 28 '13 at 1:39
Well, please check the Wikipedia page I linked to be sure –  belisarius is forth Nov 28 '13 at 1:40

2 Answers 2

up vote 4 down vote accepted

This is just to get an answer on record so the question can be removed from not-answered list.

The following is taken from an example given in Application section of the documentation for Minors.

Define the adjoint of a matrix:

adj[m_] := 
    Map[Reverse, Minors[Transpose[m], Length[m] - 1], {0, 1}] * 
      Table[(-1)^(i + j), {i, Length[m]}, {j, Length[m]}]
share|improve this answer
Well done. But you're wrong: the question gets removed from the unanswered pile only after it has upvoted answers. Wait... now you're right :) –  belisarius is forth Nov 28 '13 at 4:40
I realize there is a risk involved, but usually there is someone willing to take the bait :) –  m_goldberg Nov 28 '13 at 12:44
We're all for the rep here :) –  belisarius is forth Nov 28 '13 at 12:56
@belisarius. Rep? What rep? This is pro bono work (CW). –  m_goldberg Nov 28 '13 at 13:06
That was the reason for my smiley! –  belisarius is forth Nov 28 '13 at 13:22

Here is a simpler answer:

adj[m_] := Inverse[m] Det[m]
share|improve this answer
Nicely done.$\phantom{}$ –  J. M. is back. Jun 18 at 13:05
This only works for square matrices. The classical adjoint (also called the adjugate) can be defined for matrices of any dimension, and the answer above by @m_goldberg is the correct way to do it for non-square matrices. –  Michael Seifert Jun 18 at 14:11
And only works if the inverse exists. –  David Aug 7 at 18:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.