Using Matlab, I want to know if
$$A=\begin{pmatrix}
\cos(x) & \sin(x)\\ -\sin(x) & \cos(x)
\end{pmatrix}$$
is a rotation matrix. Hence,
$$\begin{pmatrix} \cos(x) & \sin(x)\\ -\sin(x) & \cos(x)
\end{pmatrix}\begin{pmatrix} \cos(x) & -\sin(x)\\ \sin(x) & \cos(x)
\end{pmatrix}=I$$
$$\det(A)=1$$
Yet I'm not sure how to compute it, this is what I tried:
>> A=[cos(x) -sin(x);
sin(x) cos(x)]
A =
[ cos(x), -sin(x)]
[ sin(x), cos(x)]
>> A'*A
ans =
[ cos(conj(x))*cos(x) + sin(conj(x))*sin(x), sin(conj(x))*cos(x) - cos(conj(x))*sin(x)]
[ cos(conj(x))*sin(x) - sin(conj(x))*cos(x), cos(conj(x))*cos(x) + sin(conj(x))*sin(x)]
Indeed, shouldn't the top left hand corner be $1$?
Here is something weird about the transposed:
>>A'
ans =
[ cos(conj(x)), sin(conj(x))]
[ -sin(conj(x)), cos(conj(x))]
Best Answer
If $x$ is real, then it should be declared as such: