Find all $2\times 2$ matrices that commute with $AX = XA$? Find all $2\times 2$ matrices that commute with  $$ A = \left( \begin{array}{cc} 1 & 1 \\ 0 & 0 \end{array} \right)$$ where $AX = XA$.
Solution and ask:
$$ X = \left( \begin{array}{cc} a & b \\ c & d \end{array} \right)$$
$$AX = \left( \begin{array}{cc} 1\cdot a + 1\cdot c  & 1\cdot b + 1\cdot d  \\ 0\cdot a + 0\cdot c  & 0\cdot b + 0\cdot d  \end{array} \right) = \left( \begin{array}{cc} a+c & b+d \\ 0 & 0 \end{array} \right)$$
$$XA = \left( \begin{array}{cc} a\cdot 1 + b\cdot 0  & a\cdot 1 + b\cdot 0  \\ c\cdot 1+d\cdot 0  & c\cdot 1+d\cdot 0  \end{array} \right) = \left( \begin{array}{cc} a & a \\ c & c \end{array} \right)$$
Since $AX = XA$, we obtain
$$\left( \begin{array}{cc} a+c & b+d \\ 0 & 0 \end{array} \right) = \left( \begin{array}{cc} a & a \\ c & c \end{array} \right)$$
so that $a+c = a$, $b+d = a$, $0 = c$ and $0 = c$.
Is the calculation correct?
What is the value of $a,b,c,d$ ? 
$c = 0, a = ?, b = ?, d = ?$
 A: Your calculations are correct. To summarize, you have found that $c=0$ and that $a=b+d$. This does not determine $a$, $b$ and $d$ uniquely; it only shows that such a matrix must be of the form
$$X = \left( \begin{array}{cc} b+d & b \\ 0 & d \end{array} \right).$$
Now the question that remains is; does every matrix of this form commute with $A$?
A: @Servaes answer is exactly right, but let me add one more thing: the set of all such matrices $X$ forms a subspace of the space of $2 \times 2$ matrices. 
One way to see this is to add two of them and see that the resulting matrix has the same form; the other is a little more abstract: suppose that $AX = XA$ and $AY = YA$. Then $A(X+Y) = AX + AY = XA + YA = (X+Y) A$, so the set of such matrices is closed under addition. It's also closed under scalar multiplication (which you can probably show for yourself). 
When you come across a subspace like this, it's not a bad idea to ask yourself, "What's the dimension of the subspace? What's a basis for it?" 
You can then choose a different matrix $A$, and ask yourself whether the dimension changes when $A$ changes, and if so, what's the relationship? 
I know you're not likely to pursue this if this happens to just be a homework problem and you've got others to do as well, but I offer it as a possible general approach as you advance in mathematics. 
A: Here is a synthetic solution.  Let $V$ denote the vector space of $2\times2$ matrices.  Let $T:V\to V$ be the linear operator $TX=AX-XA$.  The kernel of $T$ consists of eigenvectors of $T$ with eigenvalue $0$.  Observe that $A$ is diagonalizable with eigenvalues $0$ and $1$ (well, this is obvious since $A$ is triangular, so the eigenvalues are the diagonal entries, and since they are distinct, $A$ must be diagonalizable).  
From this thread, we know that the eigenspace of $T$ with eigenvalue $0$ is spanned by $u_0^t v_0$ and $u_1^t v_1$, where $u_\lambda$ is an eigenvector of $A^t$ with eigenvalue $\lambda\in\{0,1\}$, and $v_\lambda$ is an eigenvector of $A$ with eigenvalue $\lambda\in\{0,1\}$.  We can take $$u_0=\begin{pmatrix}0\\1\end{pmatrix},\ u_1=\begin{pmatrix}1\\1\end{pmatrix},\ v_0=\begin{pmatrix}-1\\1\end{pmatrix},\ v_1=\begin{pmatrix}1\\0\end{pmatrix}.$$
So,
$$u_0^tv_0=\begin{pmatrix}0&-1\\0&1\end{pmatrix},\ u_1^tv_1=\begin{pmatrix}1&1\\0&0\end{pmatrix}.$$
Thus, every $X\in \ker T$ must be of the form
$$a\ u_0^tv_0+b\ u_1^tv_1=\begin{pmatrix}b&-a+b\\0&a\end{pmatrix}.$$
This gives the same answer as Servaes' solution.
