# showing a function is surjective for isomorphisms

Consider a problem like the following.

Prove that $\mathbb{R}$ is isomorphic to the ring S of all $2 \times 2$ matrices of the form $\begin{bmatrix}a & 0\\0 & a\end{bmatrix}$, with $a \in \mathbb{R}$.

Pretty easy to show this is injective and a homomorphism.

Definition of surjective is that you can find a y such that f(x)=y if I'm remembering the definition correctly.

For surjective is it enough to just state that since for all $a\in \mathbb{R}$, $\begin{bmatrix}a & 0\\0 & a\end{bmatrix} = f(a)$ and thus $f$ is surjective.

A lot of these types of problems in my book seem more or less trivial to state that the function is surjective, so is this enough or should this be stated more formally?

Define $f:\mathbb{R}\to S$ to be $$f(a)=\begin{pmatrix} a&0\\ 0&a\\ \end{pmatrix}=M_a$$ Let $M_k$ be given for $k\in\mathbb{R}$. Then we know that $\exists k\in \mathbb{R}$ such that $f(k)=M_k$ by definition. So, the function is surjective.