Determine homogeneous transformation matrix for reflection about the line $y = mx + b$, or specifically $y =...












3












$begingroup$



Determine the homogeneous transformation matrix for reflection about the line
$y = mx + b$, or specifically $ y = 2x – 6$.




I use $mx - y +b =0$: $text{slope} = m$, $tan(theta)= m$



intersection with the axes:



$x =0$ is $y = -b$ and $y =0$ is $x = dfrac{b}{m}$



My question is, what can I do next?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    What are your thoughts on the problem so far? What have you tried?
    $endgroup$
    – Cameron Buie
    Nov 4 '13 at 22:21






  • 1




    $begingroup$
    zebragraph.com/Geometers_Corner_files/Reflection.pdf
    $endgroup$
    – Mickey Tin
    Apr 2 '14 at 15:14










  • $begingroup$
    Your question is not clear. Do you want to reflect in the line $y=mx+b$ or $y=2x-6$?
    $endgroup$
    – Rory Daulton
    Dec 31 '14 at 4:29
















3












$begingroup$



Determine the homogeneous transformation matrix for reflection about the line
$y = mx + b$, or specifically $ y = 2x – 6$.




I use $mx - y +b =0$: $text{slope} = m$, $tan(theta)= m$



intersection with the axes:



$x =0$ is $y = -b$ and $y =0$ is $x = dfrac{b}{m}$



My question is, what can I do next?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    What are your thoughts on the problem so far? What have you tried?
    $endgroup$
    – Cameron Buie
    Nov 4 '13 at 22:21






  • 1




    $begingroup$
    zebragraph.com/Geometers_Corner_files/Reflection.pdf
    $endgroup$
    – Mickey Tin
    Apr 2 '14 at 15:14










  • $begingroup$
    Your question is not clear. Do you want to reflect in the line $y=mx+b$ or $y=2x-6$?
    $endgroup$
    – Rory Daulton
    Dec 31 '14 at 4:29














3












3








3


1



$begingroup$



Determine the homogeneous transformation matrix for reflection about the line
$y = mx + b$, or specifically $ y = 2x – 6$.




I use $mx - y +b =0$: $text{slope} = m$, $tan(theta)= m$



intersection with the axes:



$x =0$ is $y = -b$ and $y =0$ is $x = dfrac{b}{m}$



My question is, what can I do next?










share|cite|improve this question











$endgroup$





Determine the homogeneous transformation matrix for reflection about the line
$y = mx + b$, or specifically $ y = 2x – 6$.




I use $mx - y +b =0$: $text{slope} = m$, $tan(theta)= m$



intersection with the axes:



$x =0$ is $y = -b$ and $y =0$ is $x = dfrac{b}{m}$



My question is, what can I do next?







linear-algebra






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Aug 7 '15 at 6:27









coldnumber

3,3121820




3,3121820










asked Nov 4 '13 at 22:18









Adel HassanAdel Hassan

9318




9318








  • 1




    $begingroup$
    What are your thoughts on the problem so far? What have you tried?
    $endgroup$
    – Cameron Buie
    Nov 4 '13 at 22:21






  • 1




    $begingroup$
    zebragraph.com/Geometers_Corner_files/Reflection.pdf
    $endgroup$
    – Mickey Tin
    Apr 2 '14 at 15:14










  • $begingroup$
    Your question is not clear. Do you want to reflect in the line $y=mx+b$ or $y=2x-6$?
    $endgroup$
    – Rory Daulton
    Dec 31 '14 at 4:29














  • 1




    $begingroup$
    What are your thoughts on the problem so far? What have you tried?
    $endgroup$
    – Cameron Buie
    Nov 4 '13 at 22:21






  • 1




    $begingroup$
    zebragraph.com/Geometers_Corner_files/Reflection.pdf
    $endgroup$
    – Mickey Tin
    Apr 2 '14 at 15:14










  • $begingroup$
    Your question is not clear. Do you want to reflect in the line $y=mx+b$ or $y=2x-6$?
    $endgroup$
    – Rory Daulton
    Dec 31 '14 at 4:29








1




1




$begingroup$
What are your thoughts on the problem so far? What have you tried?
$endgroup$
– Cameron Buie
Nov 4 '13 at 22:21




$begingroup$
What are your thoughts on the problem so far? What have you tried?
$endgroup$
– Cameron Buie
Nov 4 '13 at 22:21




1




1




$begingroup$
zebragraph.com/Geometers_Corner_files/Reflection.pdf
$endgroup$
– Mickey Tin
Apr 2 '14 at 15:14




$begingroup$
zebragraph.com/Geometers_Corner_files/Reflection.pdf
$endgroup$
– Mickey Tin
Apr 2 '14 at 15:14












$begingroup$
Your question is not clear. Do you want to reflect in the line $y=mx+b$ or $y=2x-6$?
$endgroup$
– Rory Daulton
Dec 31 '14 at 4:29




$begingroup$
Your question is not clear. Do you want to reflect in the line $y=mx+b$ or $y=2x-6$?
$endgroup$
– Rory Daulton
Dec 31 '14 at 4:29










2 Answers
2






active

oldest

votes


















0












$begingroup$

Write down the transform in vector form and you can derive it from scratch. The line can be written as $mx-y=-b$. The normal to the line is $vec{n}=(m,-1)$. Let's also introduce some initial point on the line -- let's say $vec{r}_0=(x,y)=(0,b)$. How do you reflect about a line through the center? Easy - subtract twice the projection to the normal. How about if it's not through the center? Move to the center, transform, and move back. The transform is:



$$vec{r} mapsto (vec{r}-vec{r}_0)-2hat{n}( hat{n}cdot(vec{r}-vec{r}_0))+vec{r}_0$$
I normalized the normal, $hat{n}=frac{vec{n}}{|n|}=frac{(m,-1)}{sqrt{m^2+1}}$.



This can be simplified to:
$$vec{r}-2hat{n}( hat{n}cdotvec{r})-2hat{n}( hat{n}cdotvec{r}_0)$$
The first two terms are the standard reflection matrix in 2D and represents the 2×2 block of your homogeneous 3×3 matrix. The last term is the offset that contributes to both components of the result, and is in the homogeneous coordinates obtained from the last column (which multiplies the constant third coordinate).



Observe that because $vec{r}_0$ is on the line, it satisfies the original equation $vec{n}cdotvec{r}_0=-b$, so our choice of the origin point is irrelevant.



Now, you can simply write the matrix out:



$$begin{bmatrix}x'\y'\1end{bmatrix}=begin{bmatrix}1-2n_x^2/|n|^2 & -2n_xn_y/|n|^2 & 2n_xb/|n|^2 \ -2n_xn_y/|n|^2 & 1-2n_y^2/|n|^2 & 2n_yb/|n|^2 \0 & 0& 1end{bmatrix}begin{bmatrix}x\y\1end{bmatrix}$$



In our specific case:
$$begin{bmatrix}1-2m^2/(m^2+1) & 2m/(m^2+1) & 2mb/(m^2+1) \ 2m/(m^2+1) & 1-2/(m^2+1) & -2b/(m^2+1) \0 & 0& 1end{bmatrix}$$





You can see it's way easier, if you use the canonical implicit form for the line. If you have
$$ax+by=c$$
where $a^2+b^2=1$, then the matrix simplifies to
$$begin{bmatrix}1-2a^2 & -2ab & -2ac \ -2ab & 1-2b^2 & -2bc \0 & 0& 1end{bmatrix}$$
or, if you want, $I-2(a,b,0)^T(a,b,c)$.






share|cite|improve this answer











$endgroup$





















    -1












    $begingroup$

    Note that any matrix $mathbf Acdot vec{0}=vec{0}$, so there is no matrix that can flip over $y=2x-6$ as it must map $vec 0 to (4 frac{4}{5},-2frac{2}{5})$. You might want to do something about that.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      We're talking about homogeneous coordinates. All affine transforms can be written as homogeneous matrices. So we're working with vectors in the form (x,y,1).
      $endgroup$
      – orion
      Feb 19 '16 at 8:03












    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f552129%2fdetermine-homogeneous-transformation-matrix-for-reflection-about-the-line-y-m%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0












    $begingroup$

    Write down the transform in vector form and you can derive it from scratch. The line can be written as $mx-y=-b$. The normal to the line is $vec{n}=(m,-1)$. Let's also introduce some initial point on the line -- let's say $vec{r}_0=(x,y)=(0,b)$. How do you reflect about a line through the center? Easy - subtract twice the projection to the normal. How about if it's not through the center? Move to the center, transform, and move back. The transform is:



    $$vec{r} mapsto (vec{r}-vec{r}_0)-2hat{n}( hat{n}cdot(vec{r}-vec{r}_0))+vec{r}_0$$
    I normalized the normal, $hat{n}=frac{vec{n}}{|n|}=frac{(m,-1)}{sqrt{m^2+1}}$.



    This can be simplified to:
    $$vec{r}-2hat{n}( hat{n}cdotvec{r})-2hat{n}( hat{n}cdotvec{r}_0)$$
    The first two terms are the standard reflection matrix in 2D and represents the 2×2 block of your homogeneous 3×3 matrix. The last term is the offset that contributes to both components of the result, and is in the homogeneous coordinates obtained from the last column (which multiplies the constant third coordinate).



    Observe that because $vec{r}_0$ is on the line, it satisfies the original equation $vec{n}cdotvec{r}_0=-b$, so our choice of the origin point is irrelevant.



    Now, you can simply write the matrix out:



    $$begin{bmatrix}x'\y'\1end{bmatrix}=begin{bmatrix}1-2n_x^2/|n|^2 & -2n_xn_y/|n|^2 & 2n_xb/|n|^2 \ -2n_xn_y/|n|^2 & 1-2n_y^2/|n|^2 & 2n_yb/|n|^2 \0 & 0& 1end{bmatrix}begin{bmatrix}x\y\1end{bmatrix}$$



    In our specific case:
    $$begin{bmatrix}1-2m^2/(m^2+1) & 2m/(m^2+1) & 2mb/(m^2+1) \ 2m/(m^2+1) & 1-2/(m^2+1) & -2b/(m^2+1) \0 & 0& 1end{bmatrix}$$





    You can see it's way easier, if you use the canonical implicit form for the line. If you have
    $$ax+by=c$$
    where $a^2+b^2=1$, then the matrix simplifies to
    $$begin{bmatrix}1-2a^2 & -2ab & -2ac \ -2ab & 1-2b^2 & -2bc \0 & 0& 1end{bmatrix}$$
    or, if you want, $I-2(a,b,0)^T(a,b,c)$.






    share|cite|improve this answer











    $endgroup$


















      0












      $begingroup$

      Write down the transform in vector form and you can derive it from scratch. The line can be written as $mx-y=-b$. The normal to the line is $vec{n}=(m,-1)$. Let's also introduce some initial point on the line -- let's say $vec{r}_0=(x,y)=(0,b)$. How do you reflect about a line through the center? Easy - subtract twice the projection to the normal. How about if it's not through the center? Move to the center, transform, and move back. The transform is:



      $$vec{r} mapsto (vec{r}-vec{r}_0)-2hat{n}( hat{n}cdot(vec{r}-vec{r}_0))+vec{r}_0$$
      I normalized the normal, $hat{n}=frac{vec{n}}{|n|}=frac{(m,-1)}{sqrt{m^2+1}}$.



      This can be simplified to:
      $$vec{r}-2hat{n}( hat{n}cdotvec{r})-2hat{n}( hat{n}cdotvec{r}_0)$$
      The first two terms are the standard reflection matrix in 2D and represents the 2×2 block of your homogeneous 3×3 matrix. The last term is the offset that contributes to both components of the result, and is in the homogeneous coordinates obtained from the last column (which multiplies the constant third coordinate).



      Observe that because $vec{r}_0$ is on the line, it satisfies the original equation $vec{n}cdotvec{r}_0=-b$, so our choice of the origin point is irrelevant.



      Now, you can simply write the matrix out:



      $$begin{bmatrix}x'\y'\1end{bmatrix}=begin{bmatrix}1-2n_x^2/|n|^2 & -2n_xn_y/|n|^2 & 2n_xb/|n|^2 \ -2n_xn_y/|n|^2 & 1-2n_y^2/|n|^2 & 2n_yb/|n|^2 \0 & 0& 1end{bmatrix}begin{bmatrix}x\y\1end{bmatrix}$$



      In our specific case:
      $$begin{bmatrix}1-2m^2/(m^2+1) & 2m/(m^2+1) & 2mb/(m^2+1) \ 2m/(m^2+1) & 1-2/(m^2+1) & -2b/(m^2+1) \0 & 0& 1end{bmatrix}$$





      You can see it's way easier, if you use the canonical implicit form for the line. If you have
      $$ax+by=c$$
      where $a^2+b^2=1$, then the matrix simplifies to
      $$begin{bmatrix}1-2a^2 & -2ab & -2ac \ -2ab & 1-2b^2 & -2bc \0 & 0& 1end{bmatrix}$$
      or, if you want, $I-2(a,b,0)^T(a,b,c)$.






      share|cite|improve this answer











      $endgroup$
















        0












        0








        0





        $begingroup$

        Write down the transform in vector form and you can derive it from scratch. The line can be written as $mx-y=-b$. The normal to the line is $vec{n}=(m,-1)$. Let's also introduce some initial point on the line -- let's say $vec{r}_0=(x,y)=(0,b)$. How do you reflect about a line through the center? Easy - subtract twice the projection to the normal. How about if it's not through the center? Move to the center, transform, and move back. The transform is:



        $$vec{r} mapsto (vec{r}-vec{r}_0)-2hat{n}( hat{n}cdot(vec{r}-vec{r}_0))+vec{r}_0$$
        I normalized the normal, $hat{n}=frac{vec{n}}{|n|}=frac{(m,-1)}{sqrt{m^2+1}}$.



        This can be simplified to:
        $$vec{r}-2hat{n}( hat{n}cdotvec{r})-2hat{n}( hat{n}cdotvec{r}_0)$$
        The first two terms are the standard reflection matrix in 2D and represents the 2×2 block of your homogeneous 3×3 matrix. The last term is the offset that contributes to both components of the result, and is in the homogeneous coordinates obtained from the last column (which multiplies the constant third coordinate).



        Observe that because $vec{r}_0$ is on the line, it satisfies the original equation $vec{n}cdotvec{r}_0=-b$, so our choice of the origin point is irrelevant.



        Now, you can simply write the matrix out:



        $$begin{bmatrix}x'\y'\1end{bmatrix}=begin{bmatrix}1-2n_x^2/|n|^2 & -2n_xn_y/|n|^2 & 2n_xb/|n|^2 \ -2n_xn_y/|n|^2 & 1-2n_y^2/|n|^2 & 2n_yb/|n|^2 \0 & 0& 1end{bmatrix}begin{bmatrix}x\y\1end{bmatrix}$$



        In our specific case:
        $$begin{bmatrix}1-2m^2/(m^2+1) & 2m/(m^2+1) & 2mb/(m^2+1) \ 2m/(m^2+1) & 1-2/(m^2+1) & -2b/(m^2+1) \0 & 0& 1end{bmatrix}$$





        You can see it's way easier, if you use the canonical implicit form for the line. If you have
        $$ax+by=c$$
        where $a^2+b^2=1$, then the matrix simplifies to
        $$begin{bmatrix}1-2a^2 & -2ab & -2ac \ -2ab & 1-2b^2 & -2bc \0 & 0& 1end{bmatrix}$$
        or, if you want, $I-2(a,b,0)^T(a,b,c)$.






        share|cite|improve this answer











        $endgroup$



        Write down the transform in vector form and you can derive it from scratch. The line can be written as $mx-y=-b$. The normal to the line is $vec{n}=(m,-1)$. Let's also introduce some initial point on the line -- let's say $vec{r}_0=(x,y)=(0,b)$. How do you reflect about a line through the center? Easy - subtract twice the projection to the normal. How about if it's not through the center? Move to the center, transform, and move back. The transform is:



        $$vec{r} mapsto (vec{r}-vec{r}_0)-2hat{n}( hat{n}cdot(vec{r}-vec{r}_0))+vec{r}_0$$
        I normalized the normal, $hat{n}=frac{vec{n}}{|n|}=frac{(m,-1)}{sqrt{m^2+1}}$.



        This can be simplified to:
        $$vec{r}-2hat{n}( hat{n}cdotvec{r})-2hat{n}( hat{n}cdotvec{r}_0)$$
        The first two terms are the standard reflection matrix in 2D and represents the 2×2 block of your homogeneous 3×3 matrix. The last term is the offset that contributes to both components of the result, and is in the homogeneous coordinates obtained from the last column (which multiplies the constant third coordinate).



        Observe that because $vec{r}_0$ is on the line, it satisfies the original equation $vec{n}cdotvec{r}_0=-b$, so our choice of the origin point is irrelevant.



        Now, you can simply write the matrix out:



        $$begin{bmatrix}x'\y'\1end{bmatrix}=begin{bmatrix}1-2n_x^2/|n|^2 & -2n_xn_y/|n|^2 & 2n_xb/|n|^2 \ -2n_xn_y/|n|^2 & 1-2n_y^2/|n|^2 & 2n_yb/|n|^2 \0 & 0& 1end{bmatrix}begin{bmatrix}x\y\1end{bmatrix}$$



        In our specific case:
        $$begin{bmatrix}1-2m^2/(m^2+1) & 2m/(m^2+1) & 2mb/(m^2+1) \ 2m/(m^2+1) & 1-2/(m^2+1) & -2b/(m^2+1) \0 & 0& 1end{bmatrix}$$





        You can see it's way easier, if you use the canonical implicit form for the line. If you have
        $$ax+by=c$$
        where $a^2+b^2=1$, then the matrix simplifies to
        $$begin{bmatrix}1-2a^2 & -2ab & -2ac \ -2ab & 1-2b^2 & -2bc \0 & 0& 1end{bmatrix}$$
        or, if you want, $I-2(a,b,0)^T(a,b,c)$.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Feb 19 '16 at 8:32

























        answered Feb 19 '16 at 8:19









        orionorion

        13.7k11937




        13.7k11937























            -1












            $begingroup$

            Note that any matrix $mathbf Acdot vec{0}=vec{0}$, so there is no matrix that can flip over $y=2x-6$ as it must map $vec 0 to (4 frac{4}{5},-2frac{2}{5})$. You might want to do something about that.






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              We're talking about homogeneous coordinates. All affine transforms can be written as homogeneous matrices. So we're working with vectors in the form (x,y,1).
              $endgroup$
              – orion
              Feb 19 '16 at 8:03
















            -1












            $begingroup$

            Note that any matrix $mathbf Acdot vec{0}=vec{0}$, so there is no matrix that can flip over $y=2x-6$ as it must map $vec 0 to (4 frac{4}{5},-2frac{2}{5})$. You might want to do something about that.






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              We're talking about homogeneous coordinates. All affine transforms can be written as homogeneous matrices. So we're working with vectors in the form (x,y,1).
              $endgroup$
              – orion
              Feb 19 '16 at 8:03














            -1












            -1








            -1





            $begingroup$

            Note that any matrix $mathbf Acdot vec{0}=vec{0}$, so there is no matrix that can flip over $y=2x-6$ as it must map $vec 0 to (4 frac{4}{5},-2frac{2}{5})$. You might want to do something about that.






            share|cite|improve this answer









            $endgroup$



            Note that any matrix $mathbf Acdot vec{0}=vec{0}$, so there is no matrix that can flip over $y=2x-6$ as it must map $vec 0 to (4 frac{4}{5},-2frac{2}{5})$. You might want to do something about that.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Nov 4 '13 at 22:50









            Tim RatiganTim Ratigan

            6,2351028




            6,2351028












            • $begingroup$
              We're talking about homogeneous coordinates. All affine transforms can be written as homogeneous matrices. So we're working with vectors in the form (x,y,1).
              $endgroup$
              – orion
              Feb 19 '16 at 8:03


















            • $begingroup$
              We're talking about homogeneous coordinates. All affine transforms can be written as homogeneous matrices. So we're working with vectors in the form (x,y,1).
              $endgroup$
              – orion
              Feb 19 '16 at 8:03
















            $begingroup$
            We're talking about homogeneous coordinates. All affine transforms can be written as homogeneous matrices. So we're working with vectors in the form (x,y,1).
            $endgroup$
            – orion
            Feb 19 '16 at 8:03




            $begingroup$
            We're talking about homogeneous coordinates. All affine transforms can be written as homogeneous matrices. So we're working with vectors in the form (x,y,1).
            $endgroup$
            – orion
            Feb 19 '16 at 8:03


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f552129%2fdetermine-homogeneous-transformation-matrix-for-reflection-about-the-line-y-m%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?