Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Understanding f:S -> R

  1. Oct 27, 2008 #1
    Understanding " f:S --> R"

    Hi all, I am kind of confused as to what it means to do this operation:

    f:S --> R

    Let's say S is a set in R^2, and function f takes its values into R^3. I see this a lot but don't really understand it. Does that mean that f is a function of two variables (call x,y) and its output is a function of (x,y,z)? Not to mention when I see a function mapping to R^n. :|
    Could anyone give me a few examples maybe to help me understand?

    Sorry if this is confusing--as you can see I am confused!

    Any help would be greatly appreciated, thank you!
  2. jcsd
  3. Oct 28, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper

    Re: Understanding " f:S --> R"

    You can consider a function as some sort of machine or translator. You input some element of one set, and it spits out an element of another set.

    The simplest example is a function from R (the real numbers) to R. For example, we can consider some function -- call it f -- which takes a real number and outputs its square. In mathematical notation, we write f(x) = x2.
    We can also make more complicated functions, for example:
    • The function d from the plane R2 to the real numbers R, which sends a point in the plane to its length from the origin. In mathematical notation, if you have a point in the plane with coordinates (x, y) then d maps it to
      [tex]d((x, y)) = d(x, y) = x^2 + y^2[/tex]
      which is a real number. In alternative notation
      [tex]d: \mathbb{R}^2 \to \mathbb{R}, (x, y) \mapsto x^2 + y^2[/tex].
    • The function m which mirrors the plane in the origin, which sends a point with coordinates (x, y) to the point with coordinates (-x, -y):
      [tex]m(x, y) = (-x, -y)[/tex]
    • A chess program on a computer wants to move a piece to some field. We can define a function P: chessboard -> choices, which describes whether it is possible to move to any given field. For example, we can describe the fields of the chessboard by labelling them 1, 2, 3, ..., 64 and take for choices the set {yes, no}. Then P assigns to each number from {1, 2, 3, ..., 64} an element from that set (either yes, or no). We can also describe the fields by their coordinates (x, y) (with x and y = 1, ..., 8) and the choices by {0, 1} (0 = cannot move, 1 = can move), then to see if the piece can be moved to b4, the computer would compute P(2, 4) which would be 0 or 1.
    • To get back to your question, suppose we have a function M from the circle C to the real numbers between -2 and 2, [itex]M: C \to [-2, 2][/itex] that is defined by [itex]M(x, y) = x + y[/itex]. Note that I am writing two input variables, what I really mean is: I have to input a point p on the circle, which I can describe (in some previously fixed coordinate system, for example with the center of the circle at the origin and with the circle of radius 1) by two coordinates x and y -- which must therefore necessarily satisfy [itex]x^2 + y^2 = 1[/itex]; then I can compute the function value M(p) of M in p by applying the given prescription of adding the x and y-coordinate of p to get a real number.
    • Final example: suppose that h is some function from [itex]R[/itex] to [itex]R^n[/itex]. Remember that [itex]R^n[/itex] is just a set of vectors with n components. The function h assigns to some single number x as input, a point in [itex]R^n[/itex]. If you want, you can think of h as being split up in n functions [itex]h_1, h_2, \cdots, h_n[/itex], all from [itex]\mathbb R \to \mathbb R[/itex], which give the n coordinates of a point. For example, let's define h(x) = ( sin(x), cos(x), x ). For each number x that I plug in, I get a point in the three-dimensional space. The point h(0) lies on the y-axis, and h(pi) has coordinates (0, -1, pi).

    Does that help you to understand it, or formulate a more precise question?
  4. Oct 28, 2008 #3


    User Avatar
    Science Advisor

    Re: Understanding " f:S --> R"

    The values of f are in R, not R3. Since a function, from A to B, can be defined as a collection of pairs, {x, y}, with x in A and y in B (and, of course, no two pairs with the same first value), we can think of f itself (not its values) as a set of things of the form ((x,y),z) which has an obvious mapping with (x, y, z) which is in R3. This is much the same as saying that the graph of f is in R3: use the x and y axes to measure the "input" and the z axis to measure the "output".

    If you are still talking about the f:S-->R with S a subset of R2, then no. The "output" is a number, just as that says, not a "function" of anything.,

    For example, z= f(x,y)= x2+ y2 has a paraboloid as a graph. We can think of the function f as given by the points (x,y,z) (in R3) on that graph.
    The "input" is the point (x,y) in R2 and the "output" is in R. It's graph is in R3.
  5. Oct 28, 2008 #4
    Re: Understanding " f:S --> R"

    If you are dealing with nicer functions, you may think about f: S->R as squeezing S in R. This point of view is much more useful in topology.

    Usually, S is denoted as a circle, so a continuous map from S->R would be like putting a stretched ribbon on the real line. Or if you want S->R^3, that would be leaving a ribbon in 3 dimensional space. f would be like different ways of putting one objects in another space. Of course, the maps may not be surjective, so you may have to squeeze the ribbon down to a point, or part of the ribbon to a line.

    if f is discontiuous (not too badly), then you may think about S->R as breaking up S in a couple pieces (or even grinning it to dust) and putting it on the real line (or whatever other spaces you are in).

    For me, these points of view are much more useful and give a lot more intuitions when working with them.
  6. Nov 8, 2008 #5


    Staff: Mentor

    Re: Understanding " f:S --> R"

    I think the OP might be using R in f: S --> R as just another letter with no special meaning, not as R the real number line.
  7. Nov 8, 2008 #6
    Re: Understanding " f:S --> R"

    Taking your example we have the function:

    [tex]f:\mathbb{R}^2 \to \mathbb{R}^3,[/tex]
    [tex](x,y) \mapsto (x,y,x-y)[/tex]

    for example [tex](1,3) \mapsto (1,3,-2)[/tex],
    that is (1,3) in R^2 is mapped to (1,3,-2) in R^3.


    Another function is
    [tex]g: \mathbb{R}^2 \to \mathbb{R}^5,[/tex]
    [tex](x,y) \mapsto (3x,5y,e^x, \mathrm{sin}(y), \mathrm{cos}(x^2))[/tex]

    for example [tex](7,2) \mapsto (21,10,e^7, \mathrm{sin}(2), \mathrm{cos}(49))[/tex].


    In general the notation f: A --> B means that elements in A are mapped to elements in B.
    In the first example the element (1,3) in A
    is mapped to the element (1,3,-2) in B.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook