Calculating angles - what's my mistake?












4












$begingroup$


Let $C[a,b]$ be the space of all continuous functions $[a,b]rightarrow mathbb R$. Then, functional



$$||f||=int^b_a|f(x)| dx$$



Clearly satisfies all the axioms of a norm, with its corresponding dot product given by: $left<f,gright>=frac12(||f+g||^2-||f||^2-||g||^2)$



Then, $frac{left<f,gright>}{||f||cdot||g||}$ should give the angle between $f$ ang $g$. But, if $f,g>0$, we have:



$left<f,gright>overset{def}=frac12((int^b_af(x)+g(x) dx)^2-(int_a^b f(x) dx)^2-(int_a^bg(x) dx)^2)=int_a^bf(x)dxint_a^bg(x)dx$



$||f||cdot||g||overset{def}=int_a^b f(x) dx int_a^bg(x) dx$



$frac{left<f,gright>}{||f||cdot||g||}=1$



So it would mean that all continouous functions with positive values are parallel to each other in this norm, which is nonsense.



Where's my mistake? How can I properly calculate angles in $(C[a,b],||cdot||)$? I know that the error must be something trivial, but I cannot find it.



Edit: Let $v,w in V: ||v||=||w||$. I know that element of $text{span}(v)$ closest to $w$ is in the form $theta v$, $theta in [0,1]$. If dot product is not a legit option, what is a general way of finding $theta$?










share|cite|improve this question











$endgroup$

















    4












    $begingroup$


    Let $C[a,b]$ be the space of all continuous functions $[a,b]rightarrow mathbb R$. Then, functional



    $$||f||=int^b_a|f(x)| dx$$



    Clearly satisfies all the axioms of a norm, with its corresponding dot product given by: $left<f,gright>=frac12(||f+g||^2-||f||^2-||g||^2)$



    Then, $frac{left<f,gright>}{||f||cdot||g||}$ should give the angle between $f$ ang $g$. But, if $f,g>0$, we have:



    $left<f,gright>overset{def}=frac12((int^b_af(x)+g(x) dx)^2-(int_a^b f(x) dx)^2-(int_a^bg(x) dx)^2)=int_a^bf(x)dxint_a^bg(x)dx$



    $||f||cdot||g||overset{def}=int_a^b f(x) dx int_a^bg(x) dx$



    $frac{left<f,gright>}{||f||cdot||g||}=1$



    So it would mean that all continouous functions with positive values are parallel to each other in this norm, which is nonsense.



    Where's my mistake? How can I properly calculate angles in $(C[a,b],||cdot||)$? I know that the error must be something trivial, but I cannot find it.



    Edit: Let $v,w in V: ||v||=||w||$. I know that element of $text{span}(v)$ closest to $w$ is in the form $theta v$, $theta in [0,1]$. If dot product is not a legit option, what is a general way of finding $theta$?










    share|cite|improve this question











    $endgroup$















      4












      4








      4





      $begingroup$


      Let $C[a,b]$ be the space of all continuous functions $[a,b]rightarrow mathbb R$. Then, functional



      $$||f||=int^b_a|f(x)| dx$$



      Clearly satisfies all the axioms of a norm, with its corresponding dot product given by: $left<f,gright>=frac12(||f+g||^2-||f||^2-||g||^2)$



      Then, $frac{left<f,gright>}{||f||cdot||g||}$ should give the angle between $f$ ang $g$. But, if $f,g>0$, we have:



      $left<f,gright>overset{def}=frac12((int^b_af(x)+g(x) dx)^2-(int_a^b f(x) dx)^2-(int_a^bg(x) dx)^2)=int_a^bf(x)dxint_a^bg(x)dx$



      $||f||cdot||g||overset{def}=int_a^b f(x) dx int_a^bg(x) dx$



      $frac{left<f,gright>}{||f||cdot||g||}=1$



      So it would mean that all continouous functions with positive values are parallel to each other in this norm, which is nonsense.



      Where's my mistake? How can I properly calculate angles in $(C[a,b],||cdot||)$? I know that the error must be something trivial, but I cannot find it.



      Edit: Let $v,w in V: ||v||=||w||$. I know that element of $text{span}(v)$ closest to $w$ is in the form $theta v$, $theta in [0,1]$. If dot product is not a legit option, what is a general way of finding $theta$?










      share|cite|improve this question











      $endgroup$




      Let $C[a,b]$ be the space of all continuous functions $[a,b]rightarrow mathbb R$. Then, functional



      $$||f||=int^b_a|f(x)| dx$$



      Clearly satisfies all the axioms of a norm, with its corresponding dot product given by: $left<f,gright>=frac12(||f+g||^2-||f||^2-||g||^2)$



      Then, $frac{left<f,gright>}{||f||cdot||g||}$ should give the angle between $f$ ang $g$. But, if $f,g>0$, we have:



      $left<f,gright>overset{def}=frac12((int^b_af(x)+g(x) dx)^2-(int_a^b f(x) dx)^2-(int_a^bg(x) dx)^2)=int_a^bf(x)dxint_a^bg(x)dx$



      $||f||cdot||g||overset{def}=int_a^b f(x) dx int_a^bg(x) dx$



      $frac{left<f,gright>}{||f||cdot||g||}=1$



      So it would mean that all continouous functions with positive values are parallel to each other in this norm, which is nonsense.



      Where's my mistake? How can I properly calculate angles in $(C[a,b],||cdot||)$? I know that the error must be something trivial, but I cannot find it.



      Edit: Let $v,w in V: ||v||=||w||$. I know that element of $text{span}(v)$ closest to $w$ is in the form $theta v$, $theta in [0,1]$. If dot product is not a legit option, what is a general way of finding $theta$?







      real-analysis vector-spaces






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Jan 31 at 17:27







      Michał Zapała

















      asked Jan 31 at 16:29









      Michał ZapałaMichał Zapała

      13812




      13812






















          3 Answers
          3






          active

          oldest

          votes


















          10












          $begingroup$

          Not every norm is compatible with an inner product, and you have discovered an example.



          Here's a simpler but very closely related example. Define the sup norm on $mathbb R^2$:
          $$|(x,y)| = |x| + |y|
          $$

          Suppose one adopts the same formula for the inner product of two vectors as given in your question. If you then take two positive vectors $vec v_1 = (x_1,y_1)$ and $vec v_2 = (x_2,y_2)$, you will similarly discover that the quantity $frac{langle vec v_1,vec v_2 rangle}{|v_1| |v_2|}$ misbehaves.



          You can see what is happening on a geometric level by examining the unit ball of the norm $|(x,y) | = |x| + |y|$: it is a diamond, not an ellipse as it would be if it were defined by a positive definite inner product. On an algebraic level, the explanation is that your inner product is not bilinear, as is said by @csprun.






          share|cite|improve this answer











          $endgroup$









          • 2




            $begingroup$
            To add to this, what makes a norm compatible with an inner product is the parallelogram law. If there is an inner product, you can easily prove this identity. However if you look at your norm, it is not hard to find two points for which it does not hold, thus there cannot be an inner product.
            $endgroup$
            – mlk
            Jan 31 at 21:39



















          6












          $begingroup$

          You dropped absolute values in your computation of $langle f,grangle$ and $||f||cdot||g||$, but when you put them back in, the dot product is not bilinear, which is a problem. And if you do leave them out, then it is not positive-definite:
          $$||f|| = sqrt{langle f,f rangle} = sqrt{left(int_a^b f(x) , dxright)^2} = 0$$
          does not imply $f=0$.



          You might want
          $$||f|| := int_a^b f(x)^2 , dx$$
          and
          $$langle f,g rangle := int_a^b f(x)g(x) , dx.$$






          share|cite|improve this answer











          $endgroup$





















            2












            $begingroup$

            The scalar product you introduce is not a scalar product.






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              While true, this doesn't really provide any additional information beyond what is stated in the other two answers. @AlessioDV
              $endgroup$
              – Tyberius
              Jan 31 at 20:13













            Your Answer





            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("mathjaxEditing", function () {
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            });
            });
            }, "mathjax-editing");

            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%2f3095096%2fcalculating-angles-whats-my-mistake%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            10












            $begingroup$

            Not every norm is compatible with an inner product, and you have discovered an example.



            Here's a simpler but very closely related example. Define the sup norm on $mathbb R^2$:
            $$|(x,y)| = |x| + |y|
            $$

            Suppose one adopts the same formula for the inner product of two vectors as given in your question. If you then take two positive vectors $vec v_1 = (x_1,y_1)$ and $vec v_2 = (x_2,y_2)$, you will similarly discover that the quantity $frac{langle vec v_1,vec v_2 rangle}{|v_1| |v_2|}$ misbehaves.



            You can see what is happening on a geometric level by examining the unit ball of the norm $|(x,y) | = |x| + |y|$: it is a diamond, not an ellipse as it would be if it were defined by a positive definite inner product. On an algebraic level, the explanation is that your inner product is not bilinear, as is said by @csprun.






            share|cite|improve this answer











            $endgroup$









            • 2




              $begingroup$
              To add to this, what makes a norm compatible with an inner product is the parallelogram law. If there is an inner product, you can easily prove this identity. However if you look at your norm, it is not hard to find two points for which it does not hold, thus there cannot be an inner product.
              $endgroup$
              – mlk
              Jan 31 at 21:39
















            10












            $begingroup$

            Not every norm is compatible with an inner product, and you have discovered an example.



            Here's a simpler but very closely related example. Define the sup norm on $mathbb R^2$:
            $$|(x,y)| = |x| + |y|
            $$

            Suppose one adopts the same formula for the inner product of two vectors as given in your question. If you then take two positive vectors $vec v_1 = (x_1,y_1)$ and $vec v_2 = (x_2,y_2)$, you will similarly discover that the quantity $frac{langle vec v_1,vec v_2 rangle}{|v_1| |v_2|}$ misbehaves.



            You can see what is happening on a geometric level by examining the unit ball of the norm $|(x,y) | = |x| + |y|$: it is a diamond, not an ellipse as it would be if it were defined by a positive definite inner product. On an algebraic level, the explanation is that your inner product is not bilinear, as is said by @csprun.






            share|cite|improve this answer











            $endgroup$









            • 2




              $begingroup$
              To add to this, what makes a norm compatible with an inner product is the parallelogram law. If there is an inner product, you can easily prove this identity. However if you look at your norm, it is not hard to find two points for which it does not hold, thus there cannot be an inner product.
              $endgroup$
              – mlk
              Jan 31 at 21:39














            10












            10








            10





            $begingroup$

            Not every norm is compatible with an inner product, and you have discovered an example.



            Here's a simpler but very closely related example. Define the sup norm on $mathbb R^2$:
            $$|(x,y)| = |x| + |y|
            $$

            Suppose one adopts the same formula for the inner product of two vectors as given in your question. If you then take two positive vectors $vec v_1 = (x_1,y_1)$ and $vec v_2 = (x_2,y_2)$, you will similarly discover that the quantity $frac{langle vec v_1,vec v_2 rangle}{|v_1| |v_2|}$ misbehaves.



            You can see what is happening on a geometric level by examining the unit ball of the norm $|(x,y) | = |x| + |y|$: it is a diamond, not an ellipse as it would be if it were defined by a positive definite inner product. On an algebraic level, the explanation is that your inner product is not bilinear, as is said by @csprun.






            share|cite|improve this answer











            $endgroup$



            Not every norm is compatible with an inner product, and you have discovered an example.



            Here's a simpler but very closely related example. Define the sup norm on $mathbb R^2$:
            $$|(x,y)| = |x| + |y|
            $$

            Suppose one adopts the same formula for the inner product of two vectors as given in your question. If you then take two positive vectors $vec v_1 = (x_1,y_1)$ and $vec v_2 = (x_2,y_2)$, you will similarly discover that the quantity $frac{langle vec v_1,vec v_2 rangle}{|v_1| |v_2|}$ misbehaves.



            You can see what is happening on a geometric level by examining the unit ball of the norm $|(x,y) | = |x| + |y|$: it is a diamond, not an ellipse as it would be if it were defined by a positive definite inner product. On an algebraic level, the explanation is that your inner product is not bilinear, as is said by @csprun.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Jan 31 at 17:01

























            answered Jan 31 at 16:51









            Lee MosherLee Mosher

            49.2k33685




            49.2k33685








            • 2




              $begingroup$
              To add to this, what makes a norm compatible with an inner product is the parallelogram law. If there is an inner product, you can easily prove this identity. However if you look at your norm, it is not hard to find two points for which it does not hold, thus there cannot be an inner product.
              $endgroup$
              – mlk
              Jan 31 at 21:39














            • 2




              $begingroup$
              To add to this, what makes a norm compatible with an inner product is the parallelogram law. If there is an inner product, you can easily prove this identity. However if you look at your norm, it is not hard to find two points for which it does not hold, thus there cannot be an inner product.
              $endgroup$
              – mlk
              Jan 31 at 21:39








            2




            2




            $begingroup$
            To add to this, what makes a norm compatible with an inner product is the parallelogram law. If there is an inner product, you can easily prove this identity. However if you look at your norm, it is not hard to find two points for which it does not hold, thus there cannot be an inner product.
            $endgroup$
            – mlk
            Jan 31 at 21:39




            $begingroup$
            To add to this, what makes a norm compatible with an inner product is the parallelogram law. If there is an inner product, you can easily prove this identity. However if you look at your norm, it is not hard to find two points for which it does not hold, thus there cannot be an inner product.
            $endgroup$
            – mlk
            Jan 31 at 21:39











            6












            $begingroup$

            You dropped absolute values in your computation of $langle f,grangle$ and $||f||cdot||g||$, but when you put them back in, the dot product is not bilinear, which is a problem. And if you do leave them out, then it is not positive-definite:
            $$||f|| = sqrt{langle f,f rangle} = sqrt{left(int_a^b f(x) , dxright)^2} = 0$$
            does not imply $f=0$.



            You might want
            $$||f|| := int_a^b f(x)^2 , dx$$
            and
            $$langle f,g rangle := int_a^b f(x)g(x) , dx.$$






            share|cite|improve this answer











            $endgroup$


















              6












              $begingroup$

              You dropped absolute values in your computation of $langle f,grangle$ and $||f||cdot||g||$, but when you put them back in, the dot product is not bilinear, which is a problem. And if you do leave them out, then it is not positive-definite:
              $$||f|| = sqrt{langle f,f rangle} = sqrt{left(int_a^b f(x) , dxright)^2} = 0$$
              does not imply $f=0$.



              You might want
              $$||f|| := int_a^b f(x)^2 , dx$$
              and
              $$langle f,g rangle := int_a^b f(x)g(x) , dx.$$






              share|cite|improve this answer











              $endgroup$
















                6












                6








                6





                $begingroup$

                You dropped absolute values in your computation of $langle f,grangle$ and $||f||cdot||g||$, but when you put them back in, the dot product is not bilinear, which is a problem. And if you do leave them out, then it is not positive-definite:
                $$||f|| = sqrt{langle f,f rangle} = sqrt{left(int_a^b f(x) , dxright)^2} = 0$$
                does not imply $f=0$.



                You might want
                $$||f|| := int_a^b f(x)^2 , dx$$
                and
                $$langle f,g rangle := int_a^b f(x)g(x) , dx.$$






                share|cite|improve this answer











                $endgroup$



                You dropped absolute values in your computation of $langle f,grangle$ and $||f||cdot||g||$, but when you put them back in, the dot product is not bilinear, which is a problem. And if you do leave them out, then it is not positive-definite:
                $$||f|| = sqrt{langle f,f rangle} = sqrt{left(int_a^b f(x) , dxright)^2} = 0$$
                does not imply $f=0$.



                You might want
                $$||f|| := int_a^b f(x)^2 , dx$$
                and
                $$langle f,g rangle := int_a^b f(x)g(x) , dx.$$







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited Jan 31 at 16:50

























                answered Jan 31 at 16:44









                cspruncsprun

                1,04318




                1,04318























                    2












                    $begingroup$

                    The scalar product you introduce is not a scalar product.






                    share|cite|improve this answer









                    $endgroup$













                    • $begingroup$
                      While true, this doesn't really provide any additional information beyond what is stated in the other two answers. @AlessioDV
                      $endgroup$
                      – Tyberius
                      Jan 31 at 20:13


















                    2












                    $begingroup$

                    The scalar product you introduce is not a scalar product.






                    share|cite|improve this answer









                    $endgroup$













                    • $begingroup$
                      While true, this doesn't really provide any additional information beyond what is stated in the other two answers. @AlessioDV
                      $endgroup$
                      – Tyberius
                      Jan 31 at 20:13
















                    2












                    2








                    2





                    $begingroup$

                    The scalar product you introduce is not a scalar product.






                    share|cite|improve this answer









                    $endgroup$



                    The scalar product you introduce is not a scalar product.







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered Jan 31 at 16:46









                    AlessioDVAlessioDV

                    2387




                    2387












                    • $begingroup$
                      While true, this doesn't really provide any additional information beyond what is stated in the other two answers. @AlessioDV
                      $endgroup$
                      – Tyberius
                      Jan 31 at 20:13




















                    • $begingroup$
                      While true, this doesn't really provide any additional information beyond what is stated in the other two answers. @AlessioDV
                      $endgroup$
                      – Tyberius
                      Jan 31 at 20:13


















                    $begingroup$
                    While true, this doesn't really provide any additional information beyond what is stated in the other two answers. @AlessioDV
                    $endgroup$
                    – Tyberius
                    Jan 31 at 20:13






                    $begingroup$
                    While true, this doesn't really provide any additional information beyond what is stated in the other two answers. @AlessioDV
                    $endgroup$
                    – Tyberius
                    Jan 31 at 20:13




















                    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%2f3095096%2fcalculating-angles-whats-my-mistake%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

                    Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                    ComboBox Display Member on multiple fields

                    Is it possible to collect Nectar points via Trainline?