Find the matrix $A$ with this condition.... If $\theta \in\mathbb{R}\setminus\{k\pi, k\in\mathbb{Z}\}$ and $A\in M_{2\times 2}(\mathbb{C})$ such that $$A^{-1} \begin{pmatrix}
        \cos \theta & -\sin\theta  \\
        \sin \theta & \cos\theta  \\
        \end{pmatrix} A= \begin{pmatrix}
        e^{i\theta} & 0  \\
        0 & e^{i\theta}  \\
        \end{pmatrix}.$$ Then Find $A?$ 
I just took $A=\begin{pmatrix}
        a & b  \\
        c & d  \\
        \end{pmatrix}$ , and subtituted in above. I try to find a,b,c and d. But i did't get correct ans.  
 A: This is not the 'right' way to answer the question, but if you use your idea, and note that you can scale $A$ so its determinant $ad-bc$ is 1 (giving a nice expression for the inverse), and multiply everything out, you get
\begin{align*}
\begin{pmatrix}
d & -b \\
-c & a
\end{pmatrix}
\begin{pmatrix}
\cos\theta & -\sin\theta \\
\sin\theta & \cos\theta
\end{pmatrix}
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}&=
\begin{pmatrix}
e^{i\theta} & 0 \\
0 & e^{i\theta}
\end{pmatrix} \\
\begin{pmatrix}
d\cos\theta-b\sin\theta & -d\sin\theta-b\cos\theta \\
-c\cos\theta+a\sin\theta & c\sin\theta+a\cos\theta
\end{pmatrix}
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}&=
\begin{pmatrix}
e^{i\theta} & 0 \\
0 & e^{i\theta}
\end{pmatrix} \\
\begin{pmatrix}
(ad-bc)\cos\theta-(ab+cd)\sin\theta & -(b^2+d^2)\sin\theta \\
(a^2+c^2)\sin\theta & (ad-bc)\cos\theta+(ab+cd)\sin\theta
\end{pmatrix}&=
\begin{pmatrix}
e^{i\theta} & 0 \\
0 & e^{i\theta}
\end{pmatrix} \\
\begin{pmatrix}
\cos\theta-(ab+cd)\sin\theta & -(b^2+d^2)\sin\theta \\
(a^2+c^2)\sin\theta & \cos\theta+(ab+cd)\sin\theta
\end{pmatrix}&=
\begin{pmatrix}
\cos\theta+i\sin\theta & 0 \\
0 & \cos\theta-i\sin\theta
\end{pmatrix}
\end{align*}
We note an important fact: $u\sin\theta+v\cos\theta=s\sin\theta+t\cos\theta$ for all values of $\theta$ in an interval iff $u=s$ and $v=t$. This implies the following:


*

*$a^2+c^2=b^2+d^2=0\implies c=\pm ia,\,d=\pm ib$

*$ab+cd=-i\implies ab-(\pm a)(\pm b)=-i$


Since $ab-(\pm a)(\pm b)\neq0$, we must choose the signs for $c$ and $d$ in different ways. Then $ab-(\pm a)(\mp b)=2ab=i$.
In fact, if we choose any $a,b,c,d$ such that $c=\pm ai,\,d=\mp bi$, and $2ab=i$, then it can be checked that the two matrices are equal.
As an example, we could pick $a=d=\sqrt{2},\,b=c=\sqrt{2}i$.
A: Building on the correction by @jflipp $A$ is the matrix that diagonalizes your matrix in the middle with sines and cosines. Do you know how to diagonalize a matrix? 
Hint: look at the eigenvectors of the matrix in the middle.
