1
$\begingroup$

Can I define a scalar function which has a vector-valued argument?

For example, let $U$ be a potential function in 3-D, and its variable is $\vec{r}=x\hat{\mathrm{i}}+y\hat{\mathrm{j}}+z\hat{\mathrm{k}}$.

Then $U$ will have the form of $U(\vec{r})$.

Is there any problem?

  • 0
    @DavidZaslavsky: Yeah, makes more sense on math.SE2012-04-12

3 Answers 3

1

The (more or less) canonical example is the divergence, here the divergence is of a vector valued function $\mathbf{F} = U(x,y,z)\hat{i} + V(x,y,z)]\hat{j} + W(x,y,z)\hat{k}$

$\operatorname{div}\,\mathbf{F} = \nabla\cdot\mathbf{F} =\frac{\partial U}{\partial x} +\frac{\partial V}{\partial y} +\frac{\partial W}{\partial z }$

3

That's a perfectly fine thing to do. The classic example of such a field is the temperature in a room: the temperature $T$ at each point $(x,y,z)$ is a function of a $3$-vector, but the output of the function is just a scalar ($T$). $\phi^4$ scalar fields are also an example, as are utility functions in economics.

2

That depends on what exactly you mean by scalar.

Do you mean a function that's just a number? Then of course you can think up any function you want that turns three input numbers $x, y$ and $z$ into one output number $U(\vec{r}) = U(x,y,z)$. Examples would be $U(\vec{r}) = |\vec{r}| = \sqrt{x^2 + y^2 + z^2}$ or $U(\vec{r}) = x + y - 2z$, or just general definitions such as $U(\vec{r}) = $ temperature at location $\vec{r}$, or $\varrho(\vec{r}) = $ Charge density at location $\vec{r}$.

If, however, by scalar you mean an object that's not only a number, but also rotationally invariant, then your options are a tiny bit limited. An object that's invariant under rotation cannot depend on the specific direction of $\vec{r}$ but only on its magnitude, so the first example above would be a scalar, but the second example would not.

EDIT: Since this was migrated from the physics SE, let me note that there are some subtle differences in nomenclature. In physics, the term "scalar" can have more meaning than "element of $\mathbb{R}$ or $\mathbb{C}$. It can mean: "Something that is invariant under rotation". Or, in the case of a Lorentz scalar, "something that is invariant under a certain transformation".