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!
 A: Let $T$ be the set of vectors $x=(x_1,x_2,x_3,x_4)\in \mathbb{R}^4$ such that
$$
\pmatrix
{
x_1 & x_2\cr
x_3 & x_4
}
\in A
$$

Since $A$ is closed under addition, so is $T$.

As you noted, $A$ contains all matrices
$$
\pmatrix
{
a & b\cr
c & d
}
\in M_2(\mathbb{R})
$$
such that $a^2+b^2+c^2+d^2=1$.

Hence, letting $S$ denote the standard unit sphere in $\mathbb{R}^4$, it follows that $S \subseteq T$.

Let $x\in \mathbb{R}^4$ be such that $|x| < 1$. 

Since the distance from $x$ to $S$ is at most one, it follows that
$$\{d(x,u)\mid u \in S\}$$
contains some values less than or equal to $1$, and some values greater than or equal to $1$. 

By continuity, there exists $u\in S$, such $d(x,u)=1$. 

Then, letting $v=x-u$, we have $|v|=1$, hence, since $x=u+v$, we have $x\in T$. 

Thus, $T$ contains the closed standard unit ball in $\mathbb{R}^4$.

Let $x\in \mathbb{R}^4$, and let $n$ be a positive integer such that $n \ge |x|$.
\begin{align*}
\text{Then}\;\;&n \ge |x|\\[4pt]
\implies\;&\left|\frac{x}{n}\right| \le 1\\[4pt]
\implies\;&\frac{x}{n} \in T\\[4pt]
\implies\;&x\in T\\[4pt]
\end{align*}
Thus, $T=\mathbb{R}^4$.

It follows that $A=M_2(\mathbb{R})$, as was to be shown.
A: Hint : First, notice that it is enough to prove that every matrix $X$ such that $\operatorname{tr}(X^tX) < 4$ is in $A$. Then for such a matrix $X$, prove that there exists a non-zero matrix $Y$ such that $$\operatorname{tr}\left(\left(\frac{X}{2}+ Y\right)^t\left(\frac{X}{2}+Y\right)\right)=1=\operatorname{tr}\left(\left(\frac{X}{2}-Y\right)^t\left(\frac{X}{2}-Y\right)\right).$$
Then use the identity $X=\left(\frac{X}{2}+ Y\right)+\left(\frac{X}{2}- Y\right)$
to conclude.
A: 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)$. 
