How I can solve this problem if my vector is $x=[1,12,2,5,7]$ instead of $x=[1,12,2,5,7]^t$ ? (Givens rotation)

32 Views Asked by At

Let we have the vector $x=[1,12,2,5,7]^t$. We have to calculate a rotation in the plane $(4,2)$ to make $x_2=0$. What should be the angle of rotation to achieve that solution?
I think I have solved this problem in a correct way... but my question is, what happens if $x$ is a horizontal vector? I mean if $x=[1,12,2,5,7]$ ?


I have used Givens rotation to solve the problem. I know that if I want $y_k=0$, I have to use the following equations:

$c=\frac{x_i}{\sqrt{x_i^2+x_k^2}}$ and $s=\frac{-x_k}{\sqrt{x_i^2+x_k^2}}$
So I in our case we've got $c=\frac{5}{13}$ and $s=\frac{-12}{13}$. So as I know that $c=cos\theta$ and $s=sin\theta$, $\space$ $\theta=-67.38º=-1.176 rad$.
So finally, using

$y_j=cx_i-sx_k$, $\space$ if $\space$ $j=i$
$y_j=sx_i+cx_k$, $\space$ if $\space$ $j=k$
$y_j=x_j$, $\space$ if $\space$$j\neq{i,k}$

we've got that $y=G(4,2,-1.176)·(1,12,2,5,7)^t=(1,0,2,13,7)^t$

But how I can do this if my vector is $x=[1,12,2,5,7]$ instead of $x=[1,12,2,5,7]^t$ ?