A problem on matrices: Find the value of $k$ 
If $
        \begin{bmatrix}
        \cos \frac{2 \pi}{7} & -\sin \frac{2 \pi}{7} \\
        \sin \frac{2 \pi}{7} & \cos \frac{2 \pi}{7}  \\
        \end{bmatrix}^k
 = 
        \begin{bmatrix}
        1 & 0 \\
        0 & 1 \\
        \end{bmatrix}
$, then the least positive integral value of $k$ is?

Actually, I got no idea how to solve this.
 I did trial and error method and got 7 as the answer.
how do i solve this? Can you please offer your assistance? Thank you
 A: We start with polar coordinates of a point $P=(r,\theta)$ vs its Cartesian form $(x,y)$. You know $x=r\cos\theta, y=r\sin\theta$. Now rotate the point $P$ by an angle of $\alpha$ with respect to origin so its angle with respect to $x$ axis becomes $\theta+\alpha$. Its new polar coordinates is $P'=(r,\theta+\alpha)$ and its new Cartesian coordinates $(x',y')$, where $x'=r\cos(\theta+\alpha), y'=r\sin(\theta+\alpha)$. Use trig identities to expand these
$x'=r(\cos \theta \cos \alpha -\sin \theta \sin \alpha)=x\cos \alpha -y \sin\alpha$, and
$ y'=r(\sin\theta\cos\alpha+\cos\theta\sin\alpha)=y\cos\alpha+x\sin\alpha$. 
If you write these as a matrix equation you can finish your problem. 
$
\left[ \begin{array}{c} x' \\ y' \end{array} \right] = \begin{bmatrix} \cos \alpha &  -\sin \alpha \\
        \sin \alpha  & \cos \alpha \\  \end{bmatrix} \times \left[ \begin{array}{c} x \\ y \end{array} \right]
$
If you have several rotation $\alpha_1, \cdots, \alpha_n$ then the effect of multiplying all the related matrices is the same as adding the given angles. In particular if you have $n$ rotations by the same angle $\alpha$ the result will be same as one rotation of $n\alpha$. In short
$
 \begin{bmatrix} \cos \alpha &  -\sin \alpha \\
        \sin \alpha  & \cos \alpha \\  \end{bmatrix}^n=  \begin{bmatrix} \cos n\alpha &  -\sin n\alpha \\
        \sin n\alpha  & \cos n\alpha \\  \end{bmatrix}$
A: Powers of matrices should always be attacked with diagonalization, if feasible. Forget $2\pi/7$, for the moment, and look at
$$
A=\begin{bmatrix}
\cos\alpha & -\sin\alpha\\
\sin\alpha & \cos\alpha
\end{bmatrix}
$$
whose characteristic polynomial is, easily, $p_A(X)=1-2X\cos\alpha+X^2$. The discriminant is $4(\cos^2\alpha-1)=4(i\sin\alpha)^2$, so the eigenvalues of $A$ are
\begin{align}
\lambda&=\cos\alpha+i\sin\alpha\\
\bar{\lambda}&=\cos\alpha-i\sin\alpha
\end{align}
Finding the eigenvectors is easy:
$$
A-\lambda I=
\begin{bmatrix}
-i\sin\alpha & -\sin\alpha\\
i\sin\alpha & \sin\alpha
\end{bmatrix}
$$
and an eigenvector is $v=[-i\quad 1]^T$. Similarly, an eigenvector for $\bar{\lambda}$ is $w=[i\quad 1]^T$. If
$$
S=\begin{bmatrix}-i & i\\1 & 1\end{bmatrix}
$$
you get immediately that
$$
S^{-1}=\frac{i}{2}\begin{bmatrix}1 & -i\\-1 & -i\end{bmatrix}
$$
so, by well known rules,
$$
A=SDS^{-1}
$$
where
$$
D=
\begin{bmatrix}
\cos\alpha+i\sin\alpha & 0 \\
0 & \cos\alpha-i\sin\alpha
\end{bmatrix}.
$$
By De Moivre's formulas, you have
$$
D^k=
\begin{bmatrix}
\cos(k\alpha)+i\sin(k\alpha) & 0 \\
0 & \cos(k\alpha)-i\sin(k\alpha)
\end{bmatrix}.
$$
Since $A^k=S D^k S^{-1}$ your problem is now to find the minimum $k$ such that $\cos(k\alpha)+i\sin(k\alpha)=1$, that is, for $\alpha=2\pi/7$,
$$
\begin{cases}
\cos k(2\pi/7)=1\\
\sin k(2\pi/7)=0
\end{cases}
$$
and you get $k=7$.
This should not be a surprise, after all: the effect of $A$ on vectors is exactly rotating them by the angle $\alpha$. If you think to the vector $v=[x\quad y]^T$ as the complex number $z=x+iy$, when you do $Av$ you get
$$
Av=
\begin{bmatrix}
\cos\alpha & -\sin\alpha\\
\sin\alpha & \cos\alpha
\end{bmatrix}
\begin{bmatrix}x\\y\end{bmatrix}
=\begin{bmatrix}
x\cos\alpha-y\sin\alpha\\x\sin\alpha+y\cos\alpha
\end{bmatrix}
$$
and
$$
(x\cos\alpha-y\sin\alpha)+i(x\sin\alpha+y\cos\alpha)=
(x+iy)(\cos\alpha+i\sin\alpha)=\lambda z
$$
(notation as above). Thus $z$ is mapped to $\lambda z$, which is just $z$ rotated by an angle $\alpha$.
A: Look if your matrix is diagonizable. If it is, write it's diagonal form. Let say that $A$ is the matrix you describe in your post, then we will write $B=S^{-1}AS$ its diagonal form where $S$ is the matrix that allows you to change from the canonical base $E$ to a base $G$ where $B$ is diagonal.
Now assume that $A$ is diagonizable you have a diagonal matrix so the problem is to find the smallest integer $k$ for which $\lambda^k_1=1$ and $\lambda^k_2=1$ where $\lambda_1$ and $\lambda_2$ are the eigenvalues of $A$. The answer you will find will be the one you are looking for. Indeed, let's say that $m$ is the smallest value for which $B^m=I_2$ then you have :
$$I_2=B^m=\underbrace{(S^{-1}AS)…(S^{-1}AS)}_{m \text{ times}}=S^{-1}A^mS \implies A^m=I_2$$
A: I founded out that $$A^k=
        \begin{bmatrix}
        \cos \frac{k.2 \pi}{7} & -\sin \frac{k.2 \pi}{7} \\
        \sin \frac{k.2 \pi}{7} & \cos \frac{k.2 \pi}{7}  \\
        \end{bmatrix}
$$
using appropriate trigonometric formulae. Now for $A=I$, $k$ should be equal to $7$ 
