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

Question about function of vectors

  1. Jul 7, 2011 #1
    Hi fellas! Would you help me solve this problem I have?

    Let's take a function [itex]f:\mathbb{R}^n\rightarrow \mathbb{R}[/itex].

    And so [itex]f(x_1,x_2,...,x_n)=y; \;\;y\in \mathbb{R}[/itex]

    It's of course a function of many variables, but can this be considered a function of a vector whose components are the [itex]x_n[/itex]'s?

    And if it actually is a function of a vector, in which way are the basis involved?

    For example if we take function [itex]f(x,y)=x+y[/itex] is it intended that we are working with
    [itex]f(x,y)=x\vec{e}_x+y\vec{e}_y[/itex] ?

    If so why then the result [itex]f(x,y)[/itex] is a scalar? And how could i put togheter the coefficient of different vectors??
    But most of all..where are the basis vectors gone?

    Thanks for your help!!

    (ps: if this is NOT a function of vectors could you make me an example of one which is??)
  2. jcsd
  3. Jul 7, 2011 #2
    There's no reason of which I'm aware for which you couldn't interpret a function from R^N to R^M as a function from N-dimensional vectors to M-dimensional vectors, if you want to. Go for it.

    A function like "f(x, y) = x + y" maps ordered pairs of real numbers to single real numbers... that is, the result is a scalar, not a vector. You could easily redefine the function as "f(x, y) = (x, y)" if you wanted to talk about the function from R^2 to R^2 which maps ordered pairs of real numbers to themselves. You could also write that as "f(x, y) = x*i + y*j" or whatever.

    In other words, the domain and codomain of functions do not need to be the same sets... or even similar, really.
  4. Jul 7, 2011 #3
    The function that inputs a vector and gives you back the magnitude of the vector is an example of a function that maps vectors to scalars. The inner product is a function that maps a pair of vectors to a scalar.
  5. Jul 7, 2011 #4
    Thanks friends!!
    But your answers seems contradictory to me:

    aegrisomnia says that the example function i proposed may be wiewed ad a function on a vector

    SteveL27 instead says that there has to be some application, like the scalar product, to convert the vectors into numbers.

    I'd say that the truth is in between: I could think to my function as a function on vectors, BUT there has to be something that keeps into account the basis vectors (a scalar product-like operator); otherwise if I perform a change to a basis which depends on the point (like the polar one) some 'information' wolud be lost.
    Did I make myself clear?
  6. Jul 7, 2011 #5


    User Avatar
    Science Advisor

    Be careful. There is a distinction between points in N dimensional space and vectors with N components.
  7. Jul 7, 2011 #6
    I didn't think I said that. aegrisomnia already gave a good answer to your question. You also asked how a vector could map to a scalar so I simply gave a familiar example. Nothing more intended by my response than mentioning a familiar example of a function that maps a vector to a scalar.

    Like the old joke says ... Q: What do you get when you cross a mosquito with a rock climber? A: Nothing. You can't cross a vector and a scalar.
  8. Jul 7, 2011 #7
    Ok, but like mathman says there is a difference between n poins in space and a vector with n components!!

    Could you explain to me what it is?

    And if I step into a function [itex]f:\mathbb{R}^n\roghtarrow\mathbb{R}[/itex] how should I understand it, as a function of n points or a function of some vector??
    Last edited: Jul 7, 2011
  9. Jul 7, 2011 #8
    There's a loose usage of the word vector and a strict usage. Under the loose usage, people call any element of R^n (or C^n) a vector. Under the strict usage, points in R^n are considered to be vectors, and real numbers are considered to be scalars, only if they have the correct properties under coordinate transformations. For instance, strictly speaking x+y is not a scalar, because it changes when you rotate space, while norm(x,y) is a good scalar. This strict usage makes most sense when you're talking about vector or scalar fields. If you ever study General Relativity this distinction will become very important.
    Last edited: Jul 7, 2011
  10. Jul 7, 2011 #9
    pmsrw3 gave a physics answer, where there really is a difference between a vector and a point.

    In math class there's not that much of a distinction. A vector is just a "point" in a vector space, and the idea of a vector being something with a "direction and magnitude" is actually misleading and you should completely forget about it. (Then when you're back in physics class you should remember it again!)

    In math, [itex]\mathbb{R}[/itex] is a one-dimensional vector space over itself. The number 5 is a vector in this space, and it's also a scalar. It's not a very important distinction.

    If you have a function [itex]\mathbb{R}^n\rightarrow \mathbb{R}[/itex], you can think of it either as

    a) a function that inputs an n-vector and gives you back a real number; or

    b) a function that inputs n real numbers and gives you back a real number.

    There is no essential difference in the two formulations, and you can think of them in whichever way is most convenient for you at any given time.

    In the "vector" interpretation, you are thinking of an n-tuple (x1, x2, ..., xn) as a single entity that has n components; and in the "function of n variables" interpretation, you're thinking of n separate real numbers being tossed into the function, as it were.

    The reason I keep putting vector in quotes is that these are the same, yet different, than the vectors in physics. In math, a vector is just an element of a vector space. That's a much more general point of view, and in this point of view, there is nothing special about a vector. It's just a name we give to an element of a vector space.

    Drawing little arrows over your variables, and thinking about "direction and magnitude," and thinking of vectors as anything special or mysterious, is what they do in physics.

    I am sure I have probably confused the issue more, and also upset the physicists too:smile:

    But the bottom line is that you can think of a function as mapping an n-vector to a real; or a function mapping n real numbers to a real. It's all the same from the math point of view.

    Let me know if anything I said helped at all, or else made it worse.

    By the way there is a joke I read the other day. The physicist's definition of a vector space is a space such that every element has a little arrow over it!
  11. Jul 7, 2011 #10
    Actually, it's even worse than that. I'm a biologist.

    Last edited: Jul 7, 2011
  12. Jul 8, 2011 #11


    User Avatar
    Science Advisor

    One distinction between points and vectors is that vectors may be added and multiplied by scalars, while points in space just sit there.
  13. Jul 8, 2011 #12


    User Avatar
    Science Advisor

    If you are going to do calculus, and take the derivative:
    [tex]f'(x_0)= \lim_{|x-x_0|\to 0}\frac{f(x)- f(x_0)}{|x-x_0|}[/tex]
    we need to be able to subtract and divide by a number in the range space- so that must be a vector space- but we only need a notion of "distance" in the domain- that only has to be a metric space.

    Also, you should understand that a "basis" just gives us a way of representing vectors in the vector space. You can always talk about "vectors", and operations on vectors without mentioning any specific basis.
  14. Jul 8, 2011 #13
    Granted, but how exactly is that pertinent in this case? More generally, in what situations would thinking of points in space as vectors with the same component values lead to trouble?

    For instance, are there any problems in associating a point on the 1-D real line (e.g. 3) with the corresponding 1-D vector (e.g. <3>)?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook