0
$\begingroup$

:)

I have this matrix:

B = \begin{bmatrix} 0.626 & 2.56 & 2.15 & \\ 0.835 & 6.66 & 5.16 & \\ 0 & 0 & -1.65 & \end{bmatrix}

I was wondering how to find a givens matrix such that I could apply it from the right side of the matrix and eliminate B[2][1] (0.835).

B*g = \begin{bmatrix} * & * & * & \\ 0 & * & * & \\ 0 & 0 & * & \end{bmatrix} Best regards, rox

$\endgroup$
0
$\begingroup$

See https://stackoverflow.com/a/4361442/380384

    | a  b  tx |
A = | c  d  ty |
    | 0  0  1  |

which transforms the coordinates [x,y,1] into:

[x',y',1] = A * [x,y,1]

Thus set the traslation into [dx,dy]=[tx,ty]

The scale is sx=sqrt(a^2+b^2) and sy=sqrt(c^2+d^2)

The rotation angle is t=atan(c/d) or t=atan(-b/a) as also they should be the same.

The inverse matrix is $$ A^{-1} = \frac{1}{a d-b c} \begin{bmatrix} d & -b & b t_y-d t_x \\ -c & a & c t_x-a t_y \\ 0 & 0 & a d - b c \end{bmatrix} $$

Or you can try

$$ \begin{bmatrix} a & b & t_x \\ c & d & t_y \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ -\frac{c}{d} & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} a-\frac{b c}{d} & b & t_x \\ 0 & d & t_y \\ 0 & 0 & 1 \end{bmatrix} $$

$\endgroup$
  • $\begingroup$ Thank you ja72. Your answer is about givens rotation or is another method? $\endgroup$ – rox Sep 25 '14 at 17:35
  • $\begingroup$ yes. Right hand rule planar rotation, with $a=d=\cos \theta$ and $b=-c=-\sin\theta$ $\endgroup$ – ja72 Sep 25 '14 at 18:52
  • $\begingroup$ Is this matrix orthogonal? $\endgroup$ – rox Sep 28 '14 at 15:41
  • $\begingroup$ No. only the first 2×2 elements are orthonomal. $\endgroup$ – ja72 Sep 28 '14 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.