A scalar function is a function ƒ(x_{1}, x_{2}, ..., x_{n}) that has a one-dimensional range. This is equivalent to saying that for each value of x_{1}, x_{2}, ..., x_{n}, ƒ has only one value: ƒ(x_{1}, x_{2}, ..., x_{n}). This property of ƒ can be written^{†} "ƒ: **R**^{n}—>**R** " or

"ƒ is the map/mapping from **R**^{n} to **R** ".

Examples of scalar functions:

- ƒ(x)=x
^{2}+3, ƒ: **R**—>**R**
- ƒ(x,y,z)=|xyz|, ƒ:
**R**^{3}—>**R**
- ƒ(x)=-x, ƒ:
**R**—>**R** *Applying this function is the same as multiplying by -1*

A more rigorous mathematician, instead of defining the function ƒ(x)=x^{2}+3, would write ƒ: x—>ƒ(x) (here x^{2}+3). This is to highlight the fact that ƒ is the function, while ƒ(x) (here x^{2}+3) is the value of the function ƒ for a specific value of x.

A few types of scalar functions:

- Many-to-one: One or more distinct values of x correspond to a distinct value of ƒ(x).

Ex: ƒ: x—>sin(x) because for x=0, 2π, 4π, ..., ƒ(x)=0; x=π, 3π, 5π, ..., ƒ(x)=1; ...
- Two-to-one: Exactly two distinct values of x correspond to a distinct value of ƒ(x).

Ex: ƒ: x—>x^{2} is two-to-one except for x=0, because for x=1,-1, ƒ(x)=1; x=2,-2, ƒ(x)=4; ...
- One-to-one (aka injective): Every distinct value of x corresponds to a distinct value of ƒ(x).

Ex: ƒ: x—>2x+3, because for x=0, ƒ(x)=3; x=1, ƒ(x)=4; ...

^{†}Assuming you are dealing with real numbers, which you might not be. **R** is the field of real numbers, but you could just as easily use **Z** (the ring of integers), **C** (the field of complex numbers), **Q** (the field of rational numbers), or anything else you like.

Sources:

Bressoud, D. *Second Year Calculus* © 1991

http://mathworld.wolfram.com/