# Givens rotation matrix is not orthogonal and doesn't zero an entry

This is a givens rotation matrix for $\theta = \pi/4$

G = \begin{bmatrix}0.7071&-0.7071&0\\0.7071&0.7071&0\\0&0&1\end{bmatrix}

Since $G'*G = I$ this matrix is orthogonal and for a given symmetric matrix (which is my case study) $A$, $G'*A*G$ has zero in $A[1,2]$ and has the same eigenvalues as $A$.

Based on Jacobi eigenvalue algorithm in order to zero an entry while keeping the eigenvalue unchanged, the $\theta$ should be $\pi/4$.

But I need to zero the $A[1,4]$ entry for a $4\times4$ symmetric matrix $A$. The following is the givens rotation matrix for $\theta=\pi/4$

G = \begin{bmatrix}1&0&0.7071&-0.7071\\0&1&0.7071&0.7071\\0&0&1&0\\0&0&0&1\end{bmatrix}

But this $G$ is not orthogonal since $G'*G \neq I$ and it doesn't zero $A[1,4]$. I am new to linear algebra I would be appreciated if you explain why this matrix is not orthogonal (I expected every givens rotation matrix to be orthogonal) and why $G'*A*G$ doesn't zero $A[1,4]$

• It's not an orthogonal matrix. The first row is not a unit vector. – Lord Shark the Unknown Jan 4 '18 at 8:43
• it looks more like a rotate + translate matrix like in affine transformations, assuming the coordinates to be rotated are index 3,4 in the vector and the translation is given by vector stored at index 1,2 – mathreadler Jan 4 '18 at 9:33
• @mathreadler I didn't get it :| – M a m a D Jan 4 '18 at 12:38
• I can try to show in an answer later this evening. – mathreadler Jan 4 '18 at 14:08

Your “$4\times 4$ Givens rotation matrix” is not a rotation matrix at all. It is not entirely clear to me what you want, but the $(1,4)$ analogue to your first rotation matrix would be $$\begin{pmatrix} \frac{1}{2}\sqrt{2} & 0 & 0 & -\frac{1}{2}\sqrt{2}\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ \frac{1}{2}\sqrt{2} & 0 & 0 & \frac{1}{2}\sqrt{2} \end{pmatrix} \approx \begin{pmatrix} 0.7071 & 0 & 0 & -0.7071\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0.7071 & 0 & 0 & 0.7071 \end{pmatrix}$$

• Thank you very much. If I want to set $A[1,4]$ to zero and keep the eigenvalues unchanged, what rotation can do this? – M a m a D Jan 6 '18 at 14:30
• @Drupalist: Think of it this way: Since you know what to do if the element is $A[1,2]$, just swap the second and fourth column, and the second and fourth row (you need to do both, so that eigenvalues and symmetry are preserved), do whatever you need to do for element $A[1,2]$, and then swap back. For extra insight, see what happens if you do the swap on the matrix I've given. – celtschk Jan 6 '18 at 14:42

Where was I, yes.. A general affine transformation (which is slightly more advanced than a rotation) can be written using an augmented matrix:

$$\left[\begin{array}{cc}A&b\\0&1\end{array}\right]$$ This when multiplied to a vector $[v^T,1]^T$ will give : $Av+b$ in the upper position. A translated version of $Av$ by $b$.

We can rewrite this as

$$\left[\begin{array}{cccc}a_{11}&a_{12}&b_1&0\\a_{21}&a_{22}&0&b_2\\0&0&1&0\\0&0&0&1\end{array}\right]$$

But this is not even what you have. What you have is instead an example of the famous Multiplication $\to$ addition property of the following matrix.

$$\left[\begin{array}{cccc}1&a\\0&1\end{array}\right]\left[\begin{array}{cccc}1&b\\0&1\end{array}\right] = \left[\begin{array}{cccc}1&a+b\\0&1\end{array}\right]$$

By block multiplication property we can identify that if $0$ and $1$ are replaced by their $2\times 2$ matrix counterparts and your 2x2 matrix in place of $a$.

So you instead have built a machinery that can add rotation matrices to each other.

edit two examples of givens rotations for 4 dimensions is for example:

$$G_1 = \left[\begin{array}{rrrr}0.7071&-0.7071&0&0\\0.7071&0.7071&0&0\\0&0&1&0\\0&0&0&1\end{array}\right]$$

$$G_2 = \left[\begin{array}{rrrr}1&0&0&0\\0&0.7071&-0.7071&0\\0&0.7071&0.7071&0\\0&0&0&1\end{array}\right]$$

You can verify the properties they should have.

• Thanks. In order to zero $A[1, 4]$ and keeping the eigenvalues unchanged, I should use affine transformation? – M a m a D Jan 5 '18 at 6:23
• I don't know what the real objective of the question is. I just wanted to clarify that it is not a rotation matrix in general and not a givens rotation in particular. – mathreadler Jan 6 '18 at 2:09
• Thanks. There is a $n \times n$ matrix and I need to set the $A[1,n]$ to zero such that the eigenvalue of the matrix doesn't change – M a m a D Jan 6 '18 at 7:18