How to find an upper triangular with $\ U^2 = I $ which gives $\ U $ is its own inverse It's obvious that $\ I $(identity matrix) of any size $\ N $ satisfies$\ I^2 = I$  so that $\ I $ is its own inverse. 
However if we consider $\ N = 2$ and attempt to find such a triangular matrix $\ U \neq I $ we have this scenario:
$$\begin{bmatrix} u_1 & u_2 \\ 0 & u_3 \\ \end{bmatrix} .\begin{bmatrix} u_1 & u_2 \\ 0 & u_3 \\ \end{bmatrix} = I$$
$$\begin{bmatrix} u_1 & u_2 \\ 0 & u_3 \\ \end{bmatrix} .\begin{bmatrix} u_1 & u_2 \\ 0 & u_3 \\ \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ \end{bmatrix}$$
$$\begin{bmatrix} u_1^2 & u_1u_2 + u_2u_3 \\ 0 & u_3^2 \\ \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ \end{bmatrix}$$
After solving this we realize that $\ u_1 = 1,u_2, u_3 = -1$ is the form of the solution where $\ U \neq I $ for $\ N = 2 $.
But for $\ N \ge 3 $, what will be the form of such matrices?

Here's one possible form. Let $a$ be any number. Define an $n \times n$ matrix as given below.
\begin{equation*}
A = \begin{bmatrix}
1 & a & \dfrac{a^2}{2} & \dfrac{a^3}{4}& \cdots & \dfrac{a^{n-1}}{2^{n-2}}\\
0 & -1 & -a & -\dfrac{a^2}{2} & \cdots & -\dfrac{a^{n-2}}{2^{n-3}}\\
0 & 0 & 1 & a & \cdots & \dfrac{a^{n-3}}{2^{n-4}}\\
0 & 0 & 0 & -1 & \cdots & -\dfrac{a^{n-4}}{2^{n-5}}\\
\vdots & \vdots & \vdots & \vdots & \ddots & \vdots\\
0 & 0 & 0 & 0 & \cdots & (-1)^{n-1}
\end{bmatrix}
\end{equation*}
Then $A^2 = I$ (verify).
