How do I properly describe the application of a rotation matrix to a function? Basically, I have my terminology and notation all mixed up and I was hoping you could help me out.
I know that if I take any function, $g(x, y) = 0$ and I substitute $x,y$ according to $x_{old} = x_{new}cos \theta + y_{new} sin \theta$, and $y_{old} = -x_{new}sin \theta + y_{new}cos \theta$, the resulting equation will plot a rotation of the original function by $\theta$, $g(x_{new}cos \theta + y_{new} sin \theta, -x_{new}sin \theta + y_{new}cos \theta) = 0$.
The idea of doing this comes from applying the rotation matrix $R$ to the vector $\vec v$:
$$\begin{bmatrix} cos \theta & -sin \theta \\ sin \theta &cos \theta \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}$$
Which is matrix-vector multiplication.
But I have my terminology and notation mixed up.
First, both $x, y \in \mathbb{R}$, and given that there are no vectors, I'm lead to say that $g: \mathbb{R} \to \mathbb{R}$. Or, is this incorrect, and given that there are two variables, even if there are no vectors, one should define $g$ as $g: \mathbb{R}^2 \to \mathbb{R}^2$?
Second, in the procedure through which $g(x, y) = 0$ becomes $g(x_{new}cos \theta + y_{new} sin \theta, -x_{new}sin \theta + y_{new}cos \theta) = 0$, is it proper to say that we are applying $R$ to $g$? But this seems to me incorrect, since $g$ wasn't defined on a vector space, but matrices are, but isn't this supposed to be correct if we defined $g: \mathbb{R}^2 \to \mathbb{R}^2$?
Thank you in advance, sorry for the confusion.
 A: I will clarify what some of the comments described. Consider a function $f(x_1, x_2, \cdots, x_n)$. Assuming the inputs are real numbers, and the output is a real number, then we can say that $f: \mathbb{R}^n \to \mathbb{R}$. This is because the function has $n$ real numbers as inputs and a real number as output.
Now, consider $\mathbf{x} = [x_1, x_2, \cdots, x_n]^T$ where the elements of $\mathbf{x}$ are a real numbers, which can be denoted by $\mathbf{x} \in \mathbb{R}^n$.
Then, instead of writing, $f(x_1, x_2, \cdots, x_n)$, we may write $f(\mathbf{x})$. This is equivalent to the previous notation, and in both cases, the function $f$ has $n$ real numbers as input and a real number as output.
Therefore, if you are considering $g(x,y)$, then you have $g: \mathbb{R}^2 \to \mathbb{R}$ assuming the inputs are real numbers, and the output is also a real number. The function $g$ is not concerned with the inputs meaning $g: \mathbb{R}^2 \to \mathbb{R}$ as long as you input real numbers. Thus, if you want to apply a rotation to the vector $[x,y]^T$, then you can write in several ways such as $g(R\mathbf{v})$ where $\mathbf{v} = [x,y]^T$, but other ways exist as well.
However, you are applying the rotation to the inputs not the function itself; thus, you cannot multiple the function by the rotation matrix. In other words, $g(R\mathbf{v}) \neq Rg(\mathbf{v})$, and furthermore, $Rg(\mathbf{v})$ doesn't actually make sense because $g$ outputs a scalar, and you can't multiple a scalar by a rotation matrix (assuming $R$ isn't a $1 \times 1$ matrix).
