I was looking at the topological group defined by $A=\left \{ \begin{pmatrix} \lambda_1 & & \\ & \ddots & \\ & & \lambda_n \end{pmatrix} : \forall 1 \leq i \leq n, \lambda_j \in \mathbb{R}\backslash \{0\} \right \}$ today, and it's said to be a closed abelian subgroup of $GL(n, \mathbb{R})$.
Unfortunately, I just have no idea how to show it is closed. I'm sure it's probably a matter of finding the good continuous map such that it is the preimage of a closed set but I have absolutely no clue what it could be.
For example, I can map each matrix to one fixed element of the diagonal (say, $\lambda_1$). Then the I can look at it $A$ as the preimage of $\mathbb{R}\setminus\{0\}$. But $\mathbb{R}\setminus\{0\}$ is open, when I need it closed to conclude.
I'd really appreciate a hand with this, please!
Your mistake is in trying to prove this is a closed subset of $M_{n\times n}(\Bbb{R})$, which it isn't. This subgroup is a closed subset of $\mathrm{GL}_n(\Bbb{R})$.
Like you wrote in the comments, using the fact $\alpha_{ij}:M_n(\Bbb{R})\to\Bbb{R},B\mapsto b_{ij}$ is continuous, one deduces that $\{B\in M_n(\Bbb{R}):b_{ij}=0\}$ is closed for any $i,j$, and hence $$\{B\in M_n(\Bbb{R}):b_{ij}=0,\forall 1\leq i,j\leq n,i\neq j\}$$ is also closed. Therefore its intersection with $\mathrm{GL}_n(\Bbb{R})$ is closed (in $\mathrm{GL}_n(\Bbb{R})$, in the subspace topology), which is exactly $A$, since the determinant of a matrix in $A$ is zero if and only if at least one of the $\lambda_i$'s is zero.