Problem: Given $x=[1,7,2,3,-1]^T $and $y=[-4,4,4,0,-4]^T$, find an orthogonal matrix $Q$ such that $Qx=y$.
My attempt: I know the definition of an orthogonal matrix. By definition, if $Q$ is an orthogonal matrix then $Q^{-1}=Q^T$. Further, I know if system of equations $Ax=b$ where $A$ is square matrix, has a solution if $b$ is in column space of $A$ i.e. if $rank(A:b)=rank(A)$.
I didn't able to solve above problem :-( please help me.
If you let $v=\frac{x-y}{\mid\mid y-x\mid\mid}$.
$A=I-2vv^t$ should do the trick.
This is called the Householder reflection.