I want to prove that a function defines a group action:
We have group $G$ of diagonal $2\times 2$ matrices under matrix multiplication, and the set $X$ of points of the Cartesian plane, eg:
$G = \left\{ \begin{bmatrix} a &0\\0&b \end{bmatrix} : a,b\in \mathbb{R} - \{0\} \right\}$, $X=\{(x,y): x,y \in \mathbb{R}\}$
For each $g =\begin{bmatrix} a &0\\0&b \end{bmatrix}\in G$ and $(x,y)\in X$ where I use minus to denote that $0\not\in$ this set, define the function
$g((x,y)) = (ax,by)$
How to prove closure, identity and composition? Refer to edits for effort shown. Question de-cluttered so people won't deem it too much effort.
In fact, if we work with column vectors, the group action you described is just the multiplication of matrices.
$$g(x,y)= \begin{pmatrix}a&0\\0&b\end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax \\ by \end{pmatrix}$$
Now the fact that this is indeed a group action follows from the well-known properties of matrix multiplication:
Another possibility how to look at this problem is to view it as the coordinatewise multiplication of 2-dimensional vectors. (If you identify the matrix $\begin{pmatrix}a&0\\0&b\end{pmatrix}$ with the vector $(a,b)$.)