How to build a matrix $A$ such that its square is proportional to its inverse

Just use the companion matrix of the polynomial $x^3-k$, which is $$ \begin{bmatrix}0&0&k\\1&0&0\\0&1&0\end{bmatrix} $$


Let $a=2\pi/3$.

The idea is to consider the rotation matrix with angle $a$ and axis $Ox$, i.e.,

$$R=\begin{pmatrix}1&0&0\\0&\cos(a)&-\sin(a)\\0&\sin(a)&\cos(a)\end{pmatrix}$$

Clearly $R^3=I$. But $R$ has more than one zero entry.

It suffices now to take $Q:=P^{-1}RP$ instead of $P$ to fulfill the nonzero condition on the entries, for (almost) any invertible matrix $P$. Indeed,

$$Q^3=P^{-1}RPP^{-1}RPP^{-1}RP=P^{-1}RP=Q$$

For example, taking $$P=\begin{pmatrix}1&1&0\\1&-1&0\\0&0&1\end{pmatrix},$$

one gets :

$$Q=\begin{pmatrix}1/4&3/4&-\sqrt{3}/4\\3/4&1/4&\sqrt{3}/4\\ \sqrt{3}/2&-\sqrt{3}/2&-1/2\end{pmatrix}$$

Of course taking $4Q$ instead of $Q$ will give a simpler matrix, with $(4Q)^3=64I$, meaning this time that we have a factor $k=64$ (till now $k=1$).


Edit : Another matrix, better on the standpoint of simplicity, is

$$R=\begin{pmatrix}0&0&1\\1&0&0\\ 0&1&0\end{pmatrix}\tag{1}$$

$R$ belongs to the category of permutation matrices, with property $R^3=I$.

Taking the same $P$ as above, on gets :

$$Q=P^{-1}RP=\begin{pmatrix}1/2&1/2&1/2\\-1/2&-1/2&1/2\\ 1&-1&0\end{pmatrix}$$

(the criteria is fulfilled : only one zero entry).

Taking $S=2Q$ (which fullfills $S^3=8I$), we get an even simpler solution :

$$S=2Q=\begin{pmatrix}1&1&1\\-1&-1&1\\ 2&-2&0\end{pmatrix}$$

Remark : matrix $R$ in (1) is as well a rotation matrix of angle $a=2 \pi/3$, but around axis $x=y=z$.