# How to find commutative matrix

I'm trying to find a solution here. When it is given a matrix without any element equal to 0 for example:

it is easy to find his commutative matrix but when it is given a matrix with some elements equal to zero for example:

I'm not sure how to find his commutative matrix.

Can anybody help me?

• I mean a matrix B such that AB=BA. – Student Oct 12 '13 at 21:23
• Hmm, $$\begin{pmatrix}1&2\\0&0\end{pmatrix}\cdot \begin{pmatrix} a & b\\c&d\end{pmatrix} = \begin{pmatrix} a+2c & b+2d\\0&0\end{pmatrix};\quad \begin{pmatrix}a&b\\c&d \end{pmatrix}\cdot \begin{pmatrix} 1&2\\0&0\end{pmatrix} = \begin{pmatrix} a & 2a\\c &2c\end{pmatrix}$$ So $c = 0$ and $b+2d = 2a$. – Daniel Fischer Oct 12 '13 at 21:29
• In this case, one says, a matrix that commutes with him, instead of his commutative matrix. :) – knsam Oct 12 '13 at 23:04

Note that if $A$ is a square matrix then $A$ commutes with $I,A,A^2,A^3,\dots$ and so with any polynomial $c_0I+c_1A+c_2A^2+\cdots+a_rA^r$ in $A$. Most of the time, those are the only matrices that commute with $A$.

If $A$ is $n\times n$, then (by Cayley-Hamilton) all powers of $A$ can be expressed in terms of $I,A,A^2,\dots,A^{n-1}$. In particular, for $n=2$, $A$ will commute with all matrices of the form $aI+bA$ and, in most cases, with nothing else.

A complete answer can be given in terms of Jordan canonical form.

\begin{align} AB &= \overbrace{\left(a + \vec{b}\cdot\vec{\sigma}\right)}^{A}\, \overbrace{\left(a' + \vec{b}'\cdot\vec{\sigma}\right)}^{B} = aa' + \vec{b}\cdot\vec{b}' + \left(a\vec{b}' + a'\vec{b} + {\rm i}\,\vec{b}\times\vec{b}'\right)\cdot\vec{\sigma} \\[3mm] BA &= \left(a' + \vec{b}'\cdot\vec{\sigma}\right) \left(a + \vec{b}\cdot\vec{\sigma}\right) = a'a + \vec{b}'\cdot\vec{b} + \left(a'\vec{b} + a\vec{b}' + {\rm i}\,\vec{b}'\times\vec{b}\right)\cdot\vec{\sigma} \end{align}

$$AB - BA = 2{\rm i}\,\vec{b}\times\vec{b}' = 0 \quad\Longrightarrow\quad \vec{b}' = \mu\vec{b}$$

Given a $2\times 2$ matrix $A \equiv a + \vec{b}\cdot\vec{\sigma}$, all the matrix of the form $a' + \mu\vec{b}\cdot\vec{\sigma}$ commutes with $A$.

For example: \begin{align} A &= \left(% \begin{array}{cc} 1 & 2 \\ 0 & 0 \end{array}\right) = \left(% \begin{array}{cc} {1 \over 2} & 0 \\ 0 & {1 \over 2} \end{array}\right) + \left(% \begin{array}{cc} {1 \over 2} & 2 \\ 0 & -\,{1 \over 2} \end{array}\right) \\[3mm]&= {1 \over 2} + \left(% \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array}\right) + {\rm i}\,\left(% \begin{array}{cc} 0 & -{\rm i} \\ {\rm i} & 0 \end{array}\right) + {1 \over 2} \left(% \begin{array}{cc} 1 & 0 \\ 0 & -1 \end{array}\right) \\[3mm]&= {1 \over 2} + \sigma_{x} + {\rm i}\sigma_{y} + {1 \over 2}\sigma_{z} = {1 \over 2} + \left(1, {\rm i}, {1 \over 2}\right)\cdot\vec{\sigma} \end{align}

Then, $$\color{#ff0000}{\large B} = \nu + \mu\left(1, {\rm i}, {1 \over 2}\right)\cdot\vec{\sigma} = \nu + \mu\,\left(% \begin{array}{cc} {1 \over 2} & 2 \\ 0 & -\,{1 \over 2} \end{array}\right) = \color{#ff0000}{\large% \left(% \begin{array}{cc} \nu + {1 \over 2}\,\mu & 2\mu \\ 0 & \nu -\,{1 \over 2}\,\mu \end{array}\right)}$$

$\displaystyle{\vec{\sigma}_{i}}$ is a $\tt\mbox{Pauli matrix}$. $\displaystyle{i \equiv x, y, z.\quad}$ $\displaystyle{\vec{\sigma} \equiv \sum_{i = x, y, z}\sigma_{i}\,e_{i}\quad}$ is the $\tt\mbox{Pauli matrix vector}.\quad$ $\displaystyle{e_{x} \equiv \hat{x},\quad e_{y} \equiv \hat{y},\quad e_{z} \equiv \hat{z}}$.