Linear transformation and matrix representation in $\mathbb R^{2\times 2}$ After spending some time on the next problem, I still don't get it. It consists of a,b and c and I think I solved a (though I might have done something wrong so any corrections are appreciated)
The real trouble starts at b, I really don't know how to solve it
c I don't really know yet, since I failed at b
Here's the question:
Let $M$ and $N$ be two $2\times 2$ matrices. In this problem we will deal with the matrix equation $MX+XM=N$
(a) Let $L:\mathbb R^{2\times 2} \to \mathbb R^{2\times 2} $ given by $L(X)=MX+XM$
Show L is a linear transformation.
My attempt:
$L(\alpha X)=M(\alpha X)+(\alpha X)M=\alpha (MX)+\alpha (XM)=\alpha (MX+XM)=\alpha L(X)$
$L(X+Y)=M(X+Y)+(X+Y)M=MX+MY+XM+YM=(MX+XM)+(MY+YM)=L(X)+L(Y)$
So L is a linear transformation.
(b) Take $M=\begin{bmatrix}a & b \\c & d \end{bmatrix}$
Write down the matrix representation of L using the following basis for $\mathbb R^{2\times 2}$
$\begin{bmatrix}1 & 0 \\0 & 0 \end{bmatrix}$ $\begin{bmatrix}0 & 1 \\0 & 0 \end{bmatrix}$ $\begin{bmatrix}0 & 0 \\1 & 0 \end{bmatrix}$ $\begin{bmatrix}0 & 0 \\0 & 1 \end{bmatrix}$
My attempt:
I think I have to split it in $L(e_1),L(e_2),L(e_3)$ and $L(e_4)$
(c) Find all values of $a,b,c,d$ such that the matrix equation ($MX+XM=N$) has a unique solution for every $N\in \mathbb R^{2\times 2}$
Thanks in advance :)

When $M = \pmatrix{a&b\\c&d}$, we can find $L$ by multiplying out $MX$ and $XM$ and adding the results.  Thus
$$
MX + XM = \pmatrix{a&b\\c&d}\pmatrix{x_{11}&x_{12}\\x_{21}&x_{22}} + 
\pmatrix{x_{11}&x_{12}\\x_{21}&x_{22}}\pmatrix{a&b\\c&d} \\
LX= \pmatrix{ax_{11}+bx_{21} & ax_{12}+bx_{22}\\cx_{11}+dx_{21} & cx_{12}+dx_{22}}
+\pmatrix{ax_{11}+cx_{12} & bx_{11}+dx_{12}\\ax_{21}+cx_{22} & bx_{21}+dx_{22}}\\
LX = \pmatrix{2ax_{11}+bx_{21}+cx_{12} & ax_{12}+bx_{22}+bx_{11}+dx_{12}\\
cx_{11}+dx_{21} + ax_{21}+cx_{22}& cx_{12}+bx_{21}+2dx_{22}}
$$
From this, we can read off where the terms involving each $x_{ij}$ appear:
$$
L\pmatrix{1&0\\0&0} = \pmatrix{2a&b\\c&0}\\
L\pmatrix{0&1\\0&0} = \pmatrix{c&a+d\\0&c}\\
L\pmatrix{0&0\\1&0} = \pmatrix{b&0\\a+d&b}\\
L\pmatrix{0&0\\0&1} = \pmatrix{0&b\\c&2d}
$$
That solves part (b).
For part (c) you can read off the equations in $x_{ij}$ that would need to be solved to solve $MX + XM = N$.  The coefficients, ordering the $x_{ij}$ as $\{x_{11}, x_{12}, x_{21}, x_{22}\}$ form the matrix 
$$
C =\pmatrix{2a&c&b&0\\ b&a+d& 0& b\\ c&0&a+d&c\\ 0&c&b&2d}
$$
The equations will have a unique solution for any $N$ provided $\det C \neq 0$.
Thus the condition on $a,b,c,d\,$ is
$$
\det C = 4(a+d)^2(ad-bc) \neq 0 \\
(ad-bc) \neq 0 \mbox{ and } a+d \neq 0
$$
Which tells you that the equation has a unique solution for all $N$  unless 
$\det M = 0$ or $M$ is traceless.
