How valid is this concept or does this already have a name? I was going through my school papers and found an interesting question, so I experimented a bit more and found out a pattern, so I made a formula for such matrices.
$$A = \begin{bmatrix}x&-(x-1)\\x+1&-x\end{bmatrix}$$ where $x > 0$ is an integer
$$A^n =
\begin{cases}
I,  & \text{if $n$ is even} \\
A, & \text{if $n$ is odd}
\end{cases}$$
where $I$ is identity matrix of order 2.
I just wanted to know if this has been found before or whether it has a name too or if there are some cases that does not obey this.
Hope someone can format my question properly, I'm new to this community. Hope this is the correct way of putting things together too. Thanks!!

Thank you for addressing our comments and clarifying your question!  Any square matrix which satisfies your equation $$A^n =
\begin{cases}
I,  & \text{if $n$ is even} \\
A, & \text{if $n$ is odd}
\end{cases}$$
is its own inverse, i.e. it is an involutory matrix.  This is because if $n = 2$ you have $AA = I$, which by definition means that $A$ is its own inverse.  From that simple statement you can extrapolate your formula, because if $n$ is even then $$A^{n} = A^{2m} = (AA)^{m} = I^{m} = I$$ for some integer $m$, and if $n$ is odd then $$A^{n} = A^{2k+1}=A^{2k}A=(AA)^{k}A = I^{k}A=IA=A$$ for some integer $k$.  In fact, for any $2\times 2$ matrix $$\begin{pmatrix} a & b\\c & -a\end{pmatrix},$$ of which your matrix is an example, such a matrix will be involutory if $a^{2} + bc = 1$.  We can verify this for your matrix $A$: $$x^{2} - (x-1)(x+1) = 1.$$
