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

Difference between Scalar Function and Vector Function?

  1. Nov 7, 2008 #1
    Okay I know the definition of a Vector and of a scalar.... but I am getting a little confused for some reason.

    Wolfram.com gives this definition of a scalar function:

    A function [itex]f(x_1,x_2,...,x_n)[/itex] of one or more variables whose range is one-dimensional, as compared to a vector function, whose range is three-dimensional (or, in general, n-dimensional).

    So if what if n=1 then is the vector function really a scalar function?

    I know this is a stupid question, but if I can answer it, I may or may not have to ask a series of even more stupid questions. :smile:
  2. jcsd
  3. Nov 7, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper

    Hi Saladsamurai! :smile:

    Short answer … yes! :biggrin:

    (that's assuming you're referring to the second n :wink:)
  4. Nov 7, 2008 #3
    Wolfram is usually not very good when it comes to general mathematics definitions, in my experience. Usually, Wikipedia has a leg up on, so you might want to check their page.

    In general, each function is associated with two sets called the domain and codomain. A function is a way to take elements from the domain and associate them with elements of the codomain. A function f with domain A and codomain B is notated f : A -> B (read f is a function from set A to set B).

    So, standard real-valued functions you study in algebra are would be notated R -> R. You can also use your knowledge of the function to be more specific. The exponential function exp(x) = e^x can take any real number as input, but always outputs a *positive* number, so we can say exp: R -> R+ (exp is a function from the reals to the positive reals). Similarly, sin(x) takes any number and maps it to a number between -1 and 1, so we can say sin: R->[-1,1] (sine is a function from the reals to the closed interval between -1 and 1).

    When you get to about your third year of calculus, you start dealing with functions other than R->R. We start working with R^2, R^3, or in general, R^n. These are all just sets, of course.

    A function like f(x, y) = x^2 + y^2 is a function of two real variables. But we often blur the distinction and pretend like it's a function of a single vector variable instead. The output, though, is a real number (because x and y are real, their squares are real, and their sums are real). So we would say f: R^2 -> R. This is often called a scalar function in physics.

    A function f(x, y) = (x^2, y^2) is also a function of two real variables. But the output this time is a vector. So f: R^2 -> R^2. Because the output is a vector, physicists often call this a vector field or a vector function.

    So summary: scalar-function and vector-function refer to the *codomain* of a function, and general, the domain is assumed to be R^2 or R^3.

    A few concrete examples. Energy potential as a function of space is a scalar function. At each point in space (represented by a vector), there is a single energy potential (a scalar).

    A force field is a vector function. At each point in space (represented by a vector), there is a force that applies to objects at that location (another vector).

    Lastly, about your question where n=1. Consider this. R^3 is a 3-dimensional space. R^2 is a plane. What does R^1 look like? It looks like a line. But interestingly, it looks EXACTLY like R. The two are called "isomorphic" because for every point on R^1 there is exactly corresponding real number and vise-versa. Here, again, we blur the distinction, and many authors would just go ahead and say R = R^1, but it's all a matter of interpretation.
  5. Nov 7, 2008 #4


    User Avatar
    Science Advisor
    Homework Helper

    Hi Tac-Tics! :smile:
    i'm not an author, but i'd say it also …

    how are you defining R^1? :confused:
  6. Nov 7, 2008 #5
    In a very straightforward manner.

    You take an n-tuple to be a function from the set 0, 1, 2, ..., n to some other set.

    For example, R^n represents the set of functions from {1, 2, ..., n} to R. This leads to the same familiar R^n for n>= 2. But additionally, it produces two more sets R^1 and R^0.

    R^1 is a set of functions and is distinct from R, but it is isomorphic to R. All elements in R^1 have the form f(0) = x (for some real x).

    R^0 is a silly trivial space, consisting of a single function: the function which maps the empty set to the reals. (It's a vacuous existence, but an existence none the less!) The single function in R^0 is the zero vector in that space.

    Of course, this is all technical nonsense ;-)
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Difference between Scalar Function and Vector Function?