# For given column vectors $x$, $y$ how to find an orthogonal matrix $Q$ such that $Qx=y$

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)$$.

• Look up Householder reflection. – Chris Custer Jan 1 at 7:04
• Sir, I didn't know the notion of the Householder reflection. Can't we solve directly? – Akash Patalwanshi Jan 1 at 7:09

If you let $$v=\frac{x-y}{\mid\mid y-x\mid\mid}$$.
$$A=I-2vv^t$$ should do the trick.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 13, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.989694356918335, "perplexity": 207.58304348632532}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-35/segments/1566027315132.71/warc/CC-MAIN-20190819221806-20190820003806-00280.warc.gz"}