[Math] Rotation Matrix inverse using Gauss-Jordan elimination

matrices

I'd like to calculate the inverse of a rotation matrix, let take the simplest case which is a $2$ x $2$ rotation matrix:

$R =\begin{bmatrix} \cos \theta & -\sin \theta \\[0.3em] \sin \theta & \cos \theta \end{bmatrix}$

I know that the inverse is the following

$R^{-1} =\begin{bmatrix} \cos \theta & \sin \theta \\[0.3em] -\sin \theta & \cos \theta \end{bmatrix}$

and I know that I can calculate it using the transpose method as such:

$R^{-1}=R^T$

but I fail to calculate the inverse using $Gauss-Jordan$ elimination, that is I don't know how to substract $\cos \theta$ from $\sin \theta$ in the second row. It all gets a bit complicated; I've looked around and nobody has a full step method using $G.-J.$ only the solution or the transpose method. Could someone provide me a full-step solution using $G.-J.$?

Best Answer

$$ \begin{bmatrix} \cos t&-\sin t&|&1&0\\ \sin t&\cos t&|&0&1 \end{bmatrix} \xrightarrow{\frac1{\cos t}R1} \begin{bmatrix} 1 &-\frac{\sin t}{\cos t}&|&\frac1{\cos t}&0\\ \sin t&\cos t&|&0&1 \end{bmatrix} \xrightarrow{R2-\sin t\,R1} \begin{bmatrix} 1 &-\frac{\sin t}{\cos t}&|&\frac1{\cos t}&0\\ 0&\cos t+\frac{\sin^2t}{\cos t}&|&-\frac{\sin t}{\cos t}&1 \end{bmatrix}= \begin{bmatrix} 1 &-\frac{\sin t}{\cos t}&|&\frac1{\cos t}&0\\ 0&\frac1{\cos t}&|&-\frac{\sin t}{\cos t}&1 \end{bmatrix} \xrightarrow{\cos t\,R2} \begin{bmatrix} 1 &-\frac{\sin t}{\cos t}&|&\frac1{\cos t}&0\\ 0&1&|&-\sin t&\cos t \end{bmatrix} \xrightarrow{R1+\frac{\sin t}{\cos t}R2} \begin{bmatrix} 1 &0&|&\frac1{\cos t}-\frac{\sin^2t}{\cos t}&\sin t\\ 0&1&|&-\sin t&\cos t \end{bmatrix} =\begin{bmatrix} 1 &0&|&\cos t&\sin t\\ 0&1&|&-\sin t&\cos t \end{bmatrix} $$

This is a terrible method to calculate the inverse of any $2\times 2$ matrix.

Edit: of course this does not work when $\cos t=0$; but this is a much easier case: you simply divide by $\sin t$ and permute the rows.

Related Question