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

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$.
