Continuous function that takes rationals to irrationals and vice-versa?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite












In this question - https://www.quora.com/Can-you-create-a-continuous-function-that-takes-rational-numbers-to-irrational-ones-and-vice-versa



How $|f(BbbQ)| leq |BbbQ|$ ? in the first answer, I understood that $|f(BbbQ^c)| leq |BbbQ|$ de to the fact that $|$Codomain$| leq |$range$|$.



After that how do I think of this? - It then follows that f is a constant function because a non-constant continuous real-valued function has an uncountable image.



Also any other approach to this question?










share|cite|improve this question



























    up vote
    4
    down vote

    favorite












    In this question - https://www.quora.com/Can-you-create-a-continuous-function-that-takes-rational-numbers-to-irrational-ones-and-vice-versa



    How $|f(BbbQ)| leq |BbbQ|$ ? in the first answer, I understood that $|f(BbbQ^c)| leq |BbbQ|$ de to the fact that $|$Codomain$| leq |$range$|$.



    After that how do I think of this? - It then follows that f is a constant function because a non-constant continuous real-valued function has an uncountable image.



    Also any other approach to this question?










    share|cite|improve this question

























      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      In this question - https://www.quora.com/Can-you-create-a-continuous-function-that-takes-rational-numbers-to-irrational-ones-and-vice-versa



      How $|f(BbbQ)| leq |BbbQ|$ ? in the first answer, I understood that $|f(BbbQ^c)| leq |BbbQ|$ de to the fact that $|$Codomain$| leq |$range$|$.



      After that how do I think of this? - It then follows that f is a constant function because a non-constant continuous real-valued function has an uncountable image.



      Also any other approach to this question?










      share|cite|improve this question















      In this question - https://www.quora.com/Can-you-create-a-continuous-function-that-takes-rational-numbers-to-irrational-ones-and-vice-versa



      How $|f(BbbQ)| leq |BbbQ|$ ? in the first answer, I understood that $|f(BbbQ^c)| leq |BbbQ|$ de to the fact that $|$Codomain$| leq |$range$|$.



      After that how do I think of this? - It then follows that f is a constant function because a non-constant continuous real-valued function has an uncountable image.



      Also any other approach to this question?







      calculus real-analysis functions continuity rational-numbers






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Sep 3 at 8:52

























      asked Sep 3 at 8:46









      BAYMAX

      2,56221121




      2,56221121




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          You probably meant it the other way : the codomain is always larger than the range above.



          Anyway, for a function, it can map every value in the domain to only one value in the range (that is, $f(x)$ is a unique value in the range), so in fact the range is also smaller than the domain . That is what the first statement reflects, since the domain is $mathbb Q$ and the range is $f(mathbb Q)$.



          The other fact follows from the intermediate value theorem : if two distinct points $a < b$ are in the range of $f(mathbb Q)$, then the entire range $[a,b]$ must belong to the range, by the fact that $f$ is continuous and hence the intermediate value theorem holds. it turns out that $[a,b]$ is uncountable if $a neq b$, so $f(mathbb Q)$ cannot contain two distinct points if it is countable: from here, $f(mathbb Q)$ must be a single point, so $f$ is constant.




          Clarification on "domain larger than range"



          The first thing that one shouldd keep in mind, especially with infinite sets, is that an infinite set may possibly have the same size as one of its subsets.



          For example, $1,2,3,...$ is of the same size as $2,3,...$, because we have a bijection between the sets, given by the map $x to x+1$. So, even though one set is contained in the other, they have the same size.



          There is a way to look at the range as a "subset of the domain" : here's how we do it . Fix any $x$ in the range. By definition of the range, there is a $y$ in the domain which maps to $x$.



          As $x$ varies over the range, collect all the $y$s and put them together to form a subset of the domain. The point is, any two different $x$ s must be associated to different $y$ s, because $f(y)$ has a unique value, so $y$ cannot be associates to two different values.



          This subset of the domain is at least as large as the range, because for each point of the range we found a different point in the domain to associate to. However, the domain itself is at least as large as this subset, and therefore as large as the range.



          All this, completely ignores containment. Which means it is entirely possible that as sets in their own right, the domain is actually strictly contained in the range. What matters for us is the cardinality i.e. the size of both sets, and for this parameter I have shown that the domain is at least as large as the range in size, even though it may be contained in it.






          share|cite|improve this answer


















          • 1




            Isi t always that cardinality of range is less than cardinality of domain?
            – BAYMAX
            Sep 3 at 9:02






          • 1




            Does a constant function fulfill the condition "codomain contains a rational and an irrational number"?
            – Maam
            Sep 3 at 9:02






          • 1




            @BAYMAX Your statement is correct, but there is also another correct statement, and that is that the domain of a function also has larger size than the range of that function. So codomain $geq$ range and domain $geq$ range are both correct statements. You are stating one of them : I am stating the other with brief justification.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:04






          • 1




            @астонвіллаолофмэллбэрг quora.com/…, I am thinking which statement to consider?
            – BAYMAX
            Sep 3 at 9:06






          • 1




            @BAYMAX Can you find a bijection between the two sets given in the post i.e. $(0,infty)$ and $(-infty,infty)$? Even if one is a subset of the other, there is no difference in their cardinality, because there is a bijection between the sets i.e. they are the same size. This might seem counterintuitive, but here's another example : $2,3,...$ has the same size as $1,2,3,...$, although it is contained in the latter. The statement I make is a statement of size, not of containment (i.e. range cannot have larger cardinality than domain), and I think I should make this more explicit.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:10










          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          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%2f2903663%2fcontinuous-function-that-takes-rationals-to-irrationals-and-vice-versa%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          You probably meant it the other way : the codomain is always larger than the range above.



          Anyway, for a function, it can map every value in the domain to only one value in the range (that is, $f(x)$ is a unique value in the range), so in fact the range is also smaller than the domain . That is what the first statement reflects, since the domain is $mathbb Q$ and the range is $f(mathbb Q)$.



          The other fact follows from the intermediate value theorem : if two distinct points $a < b$ are in the range of $f(mathbb Q)$, then the entire range $[a,b]$ must belong to the range, by the fact that $f$ is continuous and hence the intermediate value theorem holds. it turns out that $[a,b]$ is uncountable if $a neq b$, so $f(mathbb Q)$ cannot contain two distinct points if it is countable: from here, $f(mathbb Q)$ must be a single point, so $f$ is constant.




          Clarification on "domain larger than range"



          The first thing that one shouldd keep in mind, especially with infinite sets, is that an infinite set may possibly have the same size as one of its subsets.



          For example, $1,2,3,...$ is of the same size as $2,3,...$, because we have a bijection between the sets, given by the map $x to x+1$. So, even though one set is contained in the other, they have the same size.



          There is a way to look at the range as a "subset of the domain" : here's how we do it . Fix any $x$ in the range. By definition of the range, there is a $y$ in the domain which maps to $x$.



          As $x$ varies over the range, collect all the $y$s and put them together to form a subset of the domain. The point is, any two different $x$ s must be associated to different $y$ s, because $f(y)$ has a unique value, so $y$ cannot be associates to two different values.



          This subset of the domain is at least as large as the range, because for each point of the range we found a different point in the domain to associate to. However, the domain itself is at least as large as this subset, and therefore as large as the range.



          All this, completely ignores containment. Which means it is entirely possible that as sets in their own right, the domain is actually strictly contained in the range. What matters for us is the cardinality i.e. the size of both sets, and for this parameter I have shown that the domain is at least as large as the range in size, even though it may be contained in it.






          share|cite|improve this answer


















          • 1




            Isi t always that cardinality of range is less than cardinality of domain?
            – BAYMAX
            Sep 3 at 9:02






          • 1




            Does a constant function fulfill the condition "codomain contains a rational and an irrational number"?
            – Maam
            Sep 3 at 9:02






          • 1




            @BAYMAX Your statement is correct, but there is also another correct statement, and that is that the domain of a function also has larger size than the range of that function. So codomain $geq$ range and domain $geq$ range are both correct statements. You are stating one of them : I am stating the other with brief justification.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:04






          • 1




            @астонвіллаолофмэллбэрг quora.com/…, I am thinking which statement to consider?
            – BAYMAX
            Sep 3 at 9:06






          • 1




            @BAYMAX Can you find a bijection between the two sets given in the post i.e. $(0,infty)$ and $(-infty,infty)$? Even if one is a subset of the other, there is no difference in their cardinality, because there is a bijection between the sets i.e. they are the same size. This might seem counterintuitive, but here's another example : $2,3,...$ has the same size as $1,2,3,...$, although it is contained in the latter. The statement I make is a statement of size, not of containment (i.e. range cannot have larger cardinality than domain), and I think I should make this more explicit.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:10














          up vote
          3
          down vote



          accepted










          You probably meant it the other way : the codomain is always larger than the range above.



          Anyway, for a function, it can map every value in the domain to only one value in the range (that is, $f(x)$ is a unique value in the range), so in fact the range is also smaller than the domain . That is what the first statement reflects, since the domain is $mathbb Q$ and the range is $f(mathbb Q)$.



          The other fact follows from the intermediate value theorem : if two distinct points $a < b$ are in the range of $f(mathbb Q)$, then the entire range $[a,b]$ must belong to the range, by the fact that $f$ is continuous and hence the intermediate value theorem holds. it turns out that $[a,b]$ is uncountable if $a neq b$, so $f(mathbb Q)$ cannot contain two distinct points if it is countable: from here, $f(mathbb Q)$ must be a single point, so $f$ is constant.




          Clarification on "domain larger than range"



          The first thing that one shouldd keep in mind, especially with infinite sets, is that an infinite set may possibly have the same size as one of its subsets.



          For example, $1,2,3,...$ is of the same size as $2,3,...$, because we have a bijection between the sets, given by the map $x to x+1$. So, even though one set is contained in the other, they have the same size.



          There is a way to look at the range as a "subset of the domain" : here's how we do it . Fix any $x$ in the range. By definition of the range, there is a $y$ in the domain which maps to $x$.



          As $x$ varies over the range, collect all the $y$s and put them together to form a subset of the domain. The point is, any two different $x$ s must be associated to different $y$ s, because $f(y)$ has a unique value, so $y$ cannot be associates to two different values.



          This subset of the domain is at least as large as the range, because for each point of the range we found a different point in the domain to associate to. However, the domain itself is at least as large as this subset, and therefore as large as the range.



          All this, completely ignores containment. Which means it is entirely possible that as sets in their own right, the domain is actually strictly contained in the range. What matters for us is the cardinality i.e. the size of both sets, and for this parameter I have shown that the domain is at least as large as the range in size, even though it may be contained in it.






          share|cite|improve this answer


















          • 1




            Isi t always that cardinality of range is less than cardinality of domain?
            – BAYMAX
            Sep 3 at 9:02






          • 1




            Does a constant function fulfill the condition "codomain contains a rational and an irrational number"?
            – Maam
            Sep 3 at 9:02






          • 1




            @BAYMAX Your statement is correct, but there is also another correct statement, and that is that the domain of a function also has larger size than the range of that function. So codomain $geq$ range and domain $geq$ range are both correct statements. You are stating one of them : I am stating the other with brief justification.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:04






          • 1




            @астонвіллаолофмэллбэрг quora.com/…, I am thinking which statement to consider?
            – BAYMAX
            Sep 3 at 9:06






          • 1




            @BAYMAX Can you find a bijection between the two sets given in the post i.e. $(0,infty)$ and $(-infty,infty)$? Even if one is a subset of the other, there is no difference in their cardinality, because there is a bijection between the sets i.e. they are the same size. This might seem counterintuitive, but here's another example : $2,3,...$ has the same size as $1,2,3,...$, although it is contained in the latter. The statement I make is a statement of size, not of containment (i.e. range cannot have larger cardinality than domain), and I think I should make this more explicit.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:10












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          You probably meant it the other way : the codomain is always larger than the range above.



          Anyway, for a function, it can map every value in the domain to only one value in the range (that is, $f(x)$ is a unique value in the range), so in fact the range is also smaller than the domain . That is what the first statement reflects, since the domain is $mathbb Q$ and the range is $f(mathbb Q)$.



          The other fact follows from the intermediate value theorem : if two distinct points $a < b$ are in the range of $f(mathbb Q)$, then the entire range $[a,b]$ must belong to the range, by the fact that $f$ is continuous and hence the intermediate value theorem holds. it turns out that $[a,b]$ is uncountable if $a neq b$, so $f(mathbb Q)$ cannot contain two distinct points if it is countable: from here, $f(mathbb Q)$ must be a single point, so $f$ is constant.




          Clarification on "domain larger than range"



          The first thing that one shouldd keep in mind, especially with infinite sets, is that an infinite set may possibly have the same size as one of its subsets.



          For example, $1,2,3,...$ is of the same size as $2,3,...$, because we have a bijection between the sets, given by the map $x to x+1$. So, even though one set is contained in the other, they have the same size.



          There is a way to look at the range as a "subset of the domain" : here's how we do it . Fix any $x$ in the range. By definition of the range, there is a $y$ in the domain which maps to $x$.



          As $x$ varies over the range, collect all the $y$s and put them together to form a subset of the domain. The point is, any two different $x$ s must be associated to different $y$ s, because $f(y)$ has a unique value, so $y$ cannot be associates to two different values.



          This subset of the domain is at least as large as the range, because for each point of the range we found a different point in the domain to associate to. However, the domain itself is at least as large as this subset, and therefore as large as the range.



          All this, completely ignores containment. Which means it is entirely possible that as sets in their own right, the domain is actually strictly contained in the range. What matters for us is the cardinality i.e. the size of both sets, and for this parameter I have shown that the domain is at least as large as the range in size, even though it may be contained in it.






          share|cite|improve this answer














          You probably meant it the other way : the codomain is always larger than the range above.



          Anyway, for a function, it can map every value in the domain to only one value in the range (that is, $f(x)$ is a unique value in the range), so in fact the range is also smaller than the domain . That is what the first statement reflects, since the domain is $mathbb Q$ and the range is $f(mathbb Q)$.



          The other fact follows from the intermediate value theorem : if two distinct points $a < b$ are in the range of $f(mathbb Q)$, then the entire range $[a,b]$ must belong to the range, by the fact that $f$ is continuous and hence the intermediate value theorem holds. it turns out that $[a,b]$ is uncountable if $a neq b$, so $f(mathbb Q)$ cannot contain two distinct points if it is countable: from here, $f(mathbb Q)$ must be a single point, so $f$ is constant.




          Clarification on "domain larger than range"



          The first thing that one shouldd keep in mind, especially with infinite sets, is that an infinite set may possibly have the same size as one of its subsets.



          For example, $1,2,3,...$ is of the same size as $2,3,...$, because we have a bijection between the sets, given by the map $x to x+1$. So, even though one set is contained in the other, they have the same size.



          There is a way to look at the range as a "subset of the domain" : here's how we do it . Fix any $x$ in the range. By definition of the range, there is a $y$ in the domain which maps to $x$.



          As $x$ varies over the range, collect all the $y$s and put them together to form a subset of the domain. The point is, any two different $x$ s must be associated to different $y$ s, because $f(y)$ has a unique value, so $y$ cannot be associates to two different values.



          This subset of the domain is at least as large as the range, because for each point of the range we found a different point in the domain to associate to. However, the domain itself is at least as large as this subset, and therefore as large as the range.



          All this, completely ignores containment. Which means it is entirely possible that as sets in their own right, the domain is actually strictly contained in the range. What matters for us is the cardinality i.e. the size of both sets, and for this parameter I have shown that the domain is at least as large as the range in size, even though it may be contained in it.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Sep 3 at 9:19

























          answered Sep 3 at 8:56









          астон вілла олоф мэллбэрг

          33.7k32870




          33.7k32870







          • 1




            Isi t always that cardinality of range is less than cardinality of domain?
            – BAYMAX
            Sep 3 at 9:02






          • 1




            Does a constant function fulfill the condition "codomain contains a rational and an irrational number"?
            – Maam
            Sep 3 at 9:02






          • 1




            @BAYMAX Your statement is correct, but there is also another correct statement, and that is that the domain of a function also has larger size than the range of that function. So codomain $geq$ range and domain $geq$ range are both correct statements. You are stating one of them : I am stating the other with brief justification.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:04






          • 1




            @астонвіллаолофмэллбэрг quora.com/…, I am thinking which statement to consider?
            – BAYMAX
            Sep 3 at 9:06






          • 1




            @BAYMAX Can you find a bijection between the two sets given in the post i.e. $(0,infty)$ and $(-infty,infty)$? Even if one is a subset of the other, there is no difference in their cardinality, because there is a bijection between the sets i.e. they are the same size. This might seem counterintuitive, but here's another example : $2,3,...$ has the same size as $1,2,3,...$, although it is contained in the latter. The statement I make is a statement of size, not of containment (i.e. range cannot have larger cardinality than domain), and I think I should make this more explicit.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:10












          • 1




            Isi t always that cardinality of range is less than cardinality of domain?
            – BAYMAX
            Sep 3 at 9:02






          • 1




            Does a constant function fulfill the condition "codomain contains a rational and an irrational number"?
            – Maam
            Sep 3 at 9:02






          • 1




            @BAYMAX Your statement is correct, but there is also another correct statement, and that is that the domain of a function also has larger size than the range of that function. So codomain $geq$ range and domain $geq$ range are both correct statements. You are stating one of them : I am stating the other with brief justification.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:04






          • 1




            @астонвіллаолофмэллбэрг quora.com/…, I am thinking which statement to consider?
            – BAYMAX
            Sep 3 at 9:06






          • 1




            @BAYMAX Can you find a bijection between the two sets given in the post i.e. $(0,infty)$ and $(-infty,infty)$? Even if one is a subset of the other, there is no difference in their cardinality, because there is a bijection between the sets i.e. they are the same size. This might seem counterintuitive, but here's another example : $2,3,...$ has the same size as $1,2,3,...$, although it is contained in the latter. The statement I make is a statement of size, not of containment (i.e. range cannot have larger cardinality than domain), and I think I should make this more explicit.
            – Ð°ÑÑ‚он вілла олоф мэллбэрг
            Sep 3 at 9:10







          1




          1




          Isi t always that cardinality of range is less than cardinality of domain?
          – BAYMAX
          Sep 3 at 9:02




          Isi t always that cardinality of range is less than cardinality of domain?
          – BAYMAX
          Sep 3 at 9:02




          1




          1




          Does a constant function fulfill the condition "codomain contains a rational and an irrational number"?
          – Maam
          Sep 3 at 9:02




          Does a constant function fulfill the condition "codomain contains a rational and an irrational number"?
          – Maam
          Sep 3 at 9:02




          1




          1




          @BAYMAX Your statement is correct, but there is also another correct statement, and that is that the domain of a function also has larger size than the range of that function. So codomain $geq$ range and domain $geq$ range are both correct statements. You are stating one of them : I am stating the other with brief justification.
          – Ð°ÑÑ‚он вілла олоф мэллбэрг
          Sep 3 at 9:04




          @BAYMAX Your statement is correct, but there is also another correct statement, and that is that the domain of a function also has larger size than the range of that function. So codomain $geq$ range and domain $geq$ range are both correct statements. You are stating one of them : I am stating the other with brief justification.
          – Ð°ÑÑ‚он вілла олоф мэллбэрг
          Sep 3 at 9:04




          1




          1




          @астонвіллаолофмэллбэрг quora.com/…, I am thinking which statement to consider?
          – BAYMAX
          Sep 3 at 9:06




          @астонвіллаолофмэллбэрг quora.com/…, I am thinking which statement to consider?
          – BAYMAX
          Sep 3 at 9:06




          1




          1




          @BAYMAX Can you find a bijection between the two sets given in the post i.e. $(0,infty)$ and $(-infty,infty)$? Even if one is a subset of the other, there is no difference in their cardinality, because there is a bijection between the sets i.e. they are the same size. This might seem counterintuitive, but here's another example : $2,3,...$ has the same size as $1,2,3,...$, although it is contained in the latter. The statement I make is a statement of size, not of containment (i.e. range cannot have larger cardinality than domain), and I think I should make this more explicit.
          – Ð°ÑÑ‚он вілла олоф мэллбэрг
          Sep 3 at 9:10




          @BAYMAX Can you find a bijection between the two sets given in the post i.e. $(0,infty)$ and $(-infty,infty)$? Even if one is a subset of the other, there is no difference in their cardinality, because there is a bijection between the sets i.e. they are the same size. This might seem counterintuitive, but here's another example : $2,3,...$ has the same size as $1,2,3,...$, although it is contained in the latter. The statement I make is a statement of size, not of containment (i.e. range cannot have larger cardinality than domain), and I think I should make this more explicit.
          – Ð°ÑÑ‚он вілла олоф мэллбэрг
          Sep 3 at 9:10

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2903663%2fcontinuous-function-that-takes-rationals-to-irrationals-and-vice-versa%23new-answer', 'question_page');

          );

          Post as a guest













































































          這個網誌中的熱門文章

          How to combine Bézier curves to a surface?

          Mutual Information Always Non-negative

          Why am i infinitely getting the same tweet with the Twitter Search API?