Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $A,B$ be $n \times n$ matrices over the complex numbers. If $B=p(A)$ where $p(x) \in \mathbb{C}[x]$ then certainly $A,B$ commute. Under which conditions the converse is true?

Thanks :-)

share|cite|improve this question
What exactly do you mean by the converse? – copper.hat Jun 20 '12 at 15:06
i am looking for an if and only if statement – Manos Jun 20 '12 at 15:09
@Manos: copper.hat was asking you to formulate exactly what goes to the left and right of "if and only if". I'm guessing you mean something like, "What are conditions we can put on $A$ such that a matrix $B$ commutes with $A$ if and only if $B=p(A)$ for some $p(x)\in\mathbb C[x]$?" One condition that ensures this is that $A$ has $n$ distinct eigenvalues: See this question. – Jonas Meyer Jun 20 '12 at 15:14
This is the converse: Suppose $A$ and $B$ commute, is there a polynomial $p$ so that $B=p(A)$. Maybe it helps that commuting matrices always share an eigenvector... – Peter Sheldrick Jun 20 '12 at 15:17
@Jonas, third time's the charm – Peter Sheldrick Jun 20 '12 at 15:48
up vote 2 down vote accepted

The usual condition I have seen is that matrices commute if and only if they have a common basis of generalized eigenvectors.

See also Commuting Matrices

Another interpretation:

It has been pointed out that my first interpretation of the question is most likely wrong. The intended question is probably similar to this question. In that case, the answer would be that if a matrix $A$ has distinct eigenvalues, then $B$ commutes with $A$ if and only if $B=P(A)$ for some complex coefficient polynomial $P$. If $A$ is $n\times n$, then $P$ need be at most degree $n-1$.


Suppose that $A$ has distinct eigenvalues, then it is diagonalizable with a basis of eigenvectors. Thus, we can write $A=ED_AE^{-1}$ where $D_A$ is a diagonal matrix whose diagonal entries are the distinct eigenvalues of $A$ and $E$ is a matrix whose columns are the eigenvectors of $A$.

Furthermore, suppose that $B$ commutes with $A$. Since $A$ shares its basis of eigenvectors with $B$, we have that $B=ED_BE^{-1}$, where $D_B$ is diagonal and the diagonal elements of $D_B$ are the eigenvalues of $B$.

Suppose $P$ is the degree $n-1$ polynomial that takes the $n$ distinct diagonal elements of $D_A$ to the $n$ diagonal elements of $D_B$. Then, because $D_A$ and $D_B$ are diagonal, $P(D_A)=D_B$, which then gives us $$ P(A)=P(ED_AE^{-1})=EP(D_A)E^{-1}=ED_BE^{-1}=B $$

share|cite|improve this answer
this concerne a single couple $(A,B)$ of matrices. The question concerne a given matrice $A$ , when $C(A) =\mathbb C[A]$ ? – Mohamed Jun 20 '12 at 15:53
@Mohamed: I second your apprehension that this might not be a full answer to the question, but I also don't believe that Manos has really yet clarified what exactly the question is. Based on the comments, it seems that Manos might have been satisfied with the answer to a linked question, which is only a special case of your more general answer. – Jonas Meyer Jun 20 '12 at 16:07
@robjohn: Could you please clarify exactly what your first sentence is asserting? The usual condition for what? For one of the matrices to be a polynomial in the other? – Jonas Meyer Jun 20 '12 at 16:12
@JonasMeyer: I had interpreted the question as asking under what conditions on $A$ and $B$ does $AB=BA$. I may have misinterpreted the question. – robjohn Jun 20 '12 at 16:29
@robjohn: I think you did, because however unclear the precise question is, it asks for a converse of an implication that concludes that $AB=BA$. The question appears to be something like, "When does $AB=BA$ imply $B=p(A)$"? Of course I do not know why Manos accepted this answer nor why Manos hasn't made precisely clear what is being asked. – Jonas Meyer Jun 20 '12 at 19:35

THEOREM: The following are equivalent conditions about a matrix $A$ with entries in $\mathbb C$:

(I) $A$ commutes only with matrices $B = p(A)$ for some $p(x) \in \mathbb C[x]$

(II) The minimal polynomial and characteristic polynomial of $A$ coincide

(III) $A$ is similar to a companion matrix.

(IV) Each characteristic value of $A$ occurs in only one Jordan block. This includes the possibility that all eigenvalues are distinct, but allows for repetition if they all occur in one Jordan block.

share|cite|improve this answer
see complete answer at… – Will Jagy Jun 21 '12 at 15:29

The converse is true if the minimal polynom degree equal $n$

If $C(A)$ denote the space of matrix $B$ who commut with $A$. There is o formulla who gives the $C(A)$ dimension using the similarity invariants of $A$, thus : if $P_1|...|P_s$ is the similarity invariants sequence of $A$ then : $$\dim (C(A))=\sum_{i=1}^{s} (2(s-i) + 1) d_i$$ where $d_i=\text{deg} P_i$

Since $\mathbb C[A] \subset C(A) $ this formula can help us to regard is convesly if minimal polynom degree equal $n$ thens $C(A)=\mathbb C[A]$

share|cite|improve this answer

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.