A set of matrix with 2 properties Let $A \subset M_2(R)$ a set with the properties:
1)If $X,Y \in A$, then $X+Y \in A$;
2)If $X \in M_2(R)$ with $tr(X^tX)=1$, then $X \in A$.
Prove that $A=M_2(R)$.
I wrote that for a matrix $X \in M_2(R)$ with the elements $a,b,c,d$ we have by the second propertie that if $a^2+b^2+c^2+d^2=1$, then $X \in A$. Using this, for a random matrix $X$ with the elements $a,b,c,d$, we that $\frac{1}{\sqrt{a^2+b^2+c^2+d^2}}X \in A$ and if $\sqrt{a^2+b^2+c^2+d^2}$ is an integer, then $X\in A$. I don't know how to continue. Please help!

The matrices $E_{i, j}, (i,j)\in \{1,2\}^2,$ such that $$e_{k,l} = \begin{cases} 1, & \text{ if } (k,l) = (i,j) \\0,& \text{ otherwise} \end{cases}$$ are in $A$. 
Now let's show that $\pmatrix{\lambda & 0 \\ 0 & 0} \in A$. Since $\lambda = \lfloor \lambda \rfloor + (\lambda - \lfloor \lambda \rfloor$) we can assume $\lambda \in (0,1)$. 
So we're looking for $X =\pmatrix{a & b \\ c & d}$ and $Y = \pmatrix{\lambda - a & -b \\ -c & -d}$ such that $$a^2+b^2+c^2+d^2= (\lambda-a)^2+b^2+c^2+d^2 = 1$$
so that $X, Y \in A$, implying $X+Y = \pmatrix{\lambda & 0 \\ 0 & 0} \in A$. 
From the equation above, we get $a = \frac{\lambda}{2}$ ; now let's set $c, d=0$ and $b= \frac{\sqrt{4-\lambda^2}}{2}$, and we're done.
Likewise $\lambda E_{i,j} \in A$ for all $(i,j)$. Since $\pmatrix{a & b \\ c & d} = aE_{1,1} + bE_{1,2} + cE_{2,1} + dE_{2,2}$, eventually $A = \mathcal{M}_2(\Bbb R)$. 
