# Is $f(x,y) = f(\mathbf{x})$ abuse of notation?

A scalar function $f(x,y)$ is often written as $f(\mathbf{x})$, where $\mathbf{x} = (x,y)$, but as far as I know, there is a difference between the scalar function inputs $(x,y)$ and the vector input $(x,y) = x\imath+y\jmath$. As I see it $f(\mathbf{x}) = f((x,y)) = f(x\imath+y\jmath) \neq f(x,y)$. Am I wrong, or is there a simple bijection between the two concepts?

Is it simply shorthand for $f': \mathbf{x} \mapsto f''(\imath\cdot\mathbf{x},\jmath\cdot\mathbf{x})$, s.t. $f'(\mathbf{x})= f''(x,y)$?

If it's of an relevance, I'm reading about scalar fields, and this definition came up:

$\displaystyle\dfrac{\partial f}{\partial x}(x,y) = \lim_{h\to 0} \dfrac{f(x+h, y)-f(x,y)}{h} \overset{\color{green}{?}}{=} \dfrac{f(\mathbf{x}+h\imath)-f(\mathbf{x})}{h} = \dfrac{\partial f}{\partial\imath}(\mathbf{x})$

While it looks nice I'm just curious if it's correct. However I don't see how $f$ can be differentiated with respect to both $\imath$ (a vector) and $x$ (a scalar), unless it's actually two different functions $f'$ and $f''$...

From page 32 of Halmos's book, Naive Set Theory: • +1 thank you for enlisting Halmos' elegant prose to answer the spirit of the question. Jun 2, 2016 at 13:33

$f(\mathbf{x}) = f((x, y))$ is more commonly written as $f(x, y)$ (where $\mathbf{x}=(x, y)$ is a vector in e.g. $\mathbb{R}^2$). The same thing happens with longer tuples: $f(x_1, \ldots, x_n)$. Pedantically speaking, $f((x, y))$ is indeed the (more) correct notation. I suppose the reason for omitting the extra parenthesis (besides convention) is that they are simply reduntant; removing them causes no ambiguity whatsoever.

• So there's no difference between tuples $(x_1,...,x_n)$ and vectors $(x_1,...,x_n)$? Jun 2, 2016 at 17:52
• That depends on your vector space. There are vector spaces out there in which vectors are not tuples, but something else instead (e.g. linear functions). However, because every vector space has a basis, it is always isomorphic to some other vector space which does use tuples as vectors, so it is common practice (in the case of finite vector spaces, at least) to simply write vectors as tuples. Jun 2, 2016 at 23:20
• So it's not just vectors that should be written $f((x,y))$, but (pedantically) tuples as well? Does that mean that a single-variable function should actually be written $f((x))$, considering $(x)$ is a 1-tuple? And does that mean that $f(x,y)$ is $\textit{never}$ ambiguous? Jun 3, 2016 at 7:39
• $f((x,y))$ is the "more correct" notation for tuples $(x,y)$ in general. There is no such a thing as a 1-tuple (unless you deliberately define it), since $A^1 = A$ for a set $A$. I cannot see how $f((x, y)) = f(x, y)$ could possibly be ambiguous, since it is simply a function $f:A\times B\to C$ (with $A, B, C$ sets); its argument is just a tuple in $A\times B$ (therefore one parenthesis for the tuple and another to delimit the function's argument), although you can also interpret this as the function having two distinct arguments (hence the notation with a single parenthesis). Jun 3, 2016 at 8:16
• There's no difference between tuples and vectors, as far as just your function is concerned. Being a vector just reflects how it behaves under transformation. $f$ is just a mapping from tuples to a target space (probably a scalar), no matter where you get the tuple from. Once you ensure your tuple is a vector, then you gain additional properties of the function under coordinate transformations. Nov 8, 2017 at 12:26

I would not call this abuse of notation as we are just using two different notations for the same thing.

We are basically just switching back and forth between vectors $\vec x = xi+yj$ and the coordinates of the vectors $(x,y)$ with respect to a certain basis $(i,j)$. (Usually the basis is implicitly the cannonical one, or can be derived from the context.) As the coordinates of a vector with respect to a given basis are unique, this is does not allow any ambiguity.

Your example is indeed correct, and it obviously depends on how whether you define first a vectorial derivative or first the partial derivative. In any case, the derivative in the direction of a basis vector is equal to the derivative with respect to the corresponding coordinate.

• I don't see why the $(x,y)$ in $f(x,y)$ are supposed to be vectors, isn't there a difference between vectors and function inputs? If $(x,y)$ were vectors, wouldn't $f((x,y))$ be better (although slightly awkward)? Jun 2, 2016 at 11:30
• Well I did consider $f(x,y)$ and $f((x,y))$ as the same function, as both of them use a coordinate representation (obviously depending on a basis), I assumed you were talking about the use of coordinate / coordinate-free representations of vector spaces. Jun 2, 2016 at 11:38
• Then how are you supposed to tell the difference between $f(x,y)$ and $f((x,y))$? I get that they have a lot of similarities, but they wouldn't be the same function, would they? Jun 2, 2016 at 11:54
• @FrankVel: Why do you suppose there needs to be a difference? To me they are literally the same function -- a set of pairs where the first element is a pair $(x,y)$ and the second element is a function value. (More precisely, my usual formalization of a "function of two arguments" is as a function of pairs). Jun 2, 2016 at 12:36
• @FrankVel: To me the vector space $\mathbb R^2$ is the set of (ordinary) pairs of real numbers, together with certain addition and multiplication operations. A vector in $\mathbb R^2$ is always a pair, and a pair or numbers is a vector whenever we decide to treat it like one. Your $\imath$ and $\jmath$ I would consider to be abbreviations for the vectors (that is, pairs) $(1,0)$ and $(0,1)$. Jun 2, 2016 at 13:52

$\newcommand{\Vec}{\mathbf{#1}}\newcommand{\Reals}{\mathbf{R}}$Literally, you're correct: There is a meaningful distinction between

1. A real-valued function $f$ accepting two real numbers as input;

2. A real-valued function $g$ accepting an ordered pair of real numbers as input.

Just as you say, the literal notations would be $f(x, y)$ and $g(\Vec{x}) = g\bigl((x, y)\bigr)$, respectively. Strongly-typed computer languages such as C++ enforce this distinction.

Even in pure mathematics, if $f$ is a real-valued function accepting two real numbers as input, you can guiltlessly form, e.g., $$f\bigl(x, f(y, z)\bigr),\qquad f\bigl(f(x, y), z\bigr).$$ By contrast, if $g$ accepts ordered pairs of reals as input and returns real values, it would feel at least incrementally wrong to write $$g\bigl(x, g(\Vec{y})\bigr),\qquad g\bigl(g(\Vec{x}), z\bigr).$$ (Note to self: In mathematics, one wrong doesn't make a write.)

Luckily, we're saved from serious ambiguity by the natural identification of ordered pairs of real numbers (two real things, $\Reals \times \Reals$) with ordered pairs of real numbers (one vector thing, $\Reals^{2}$). Practically, this identification allows us to drop the second set of parentheses, and write $g(x, y)$ instead of $g\bigl((x, y)\bigr)$ as convenience dictates.

• While I was typing, Rodrigo de Azevedo added a third (+1) answer; posting this anyway, since there are points that don't seem to have been mentioned by existing answers. Jun 2, 2016 at 13:45
• Some answers suggest that $f(x,y) = f((x,y))$ and $g(\mathbf{x}) = g((x,y))$; does this mean that $h((x,y))$ is ambiguous - it doesn't tell you you have one thing ($\mathbf{R}^2$) or two things ($\mathbf{R}\times\mathbf{R}$)? Jun 3, 2016 at 9:54
• I would read $h((x, y))$ as "one thing" and $f(x, y)$ as "two things". Again, some computer languages draw and enforce such a distinction to allow the compiler to manage memory accordingly. (A "pair" can be guaranteed to be stored contiguously; two numbers need not be.) That said, in Halmos' treatment, $\Reals^{2}$ and $\Reals \times \Reals$ are not just naturally identified, but actually identical. Ultimately, it looks to me that according to both Halmos and C++, "$f((x, y)) = f(x, y)$" is an abuse of notation, but for slightly different reasons. To Halmos, the abuse is harmless. Jun 3, 2016 at 14:27
• @AndrewD.Hwang How do you define a function taking two real numbers as input, and why would you? The definition that I am familiar with is that a function $f\colon A\to B$ is a subset of $A\times B$ such that for each $a\in A$, there is some $b\in B$ and a unique $(a,b)\in f$. I have never seen a mathematical definition of a function which does not take a set as an input. Jun 10, 2016 at 4:01
• @Szmagpie: As a mathematician, I naturally accept the definition of a mapping. But again, there's a meaningful syntactic distinction between "a function of two real variables" and "a function of one vector variable". Reasons to separate the concepts (in programming) include being able to enforce data type guarantees at compile time, and ensuring that data are stored contiguously in memory. Jun 10, 2016 at 12:07

A viewpoint that hasn't been mentioned yet:

We can take $f\mathbf{x}$ and $f\langle x,y\rangle$ as the "correct" notations, and then stipulate that we can include round brackets wherever we want, as disambiguators. Under these conventions, the notations $$f(\mathbf{x}),\quad f\langle x,y\rangle$$ are perfectly acceptable.

This also gives us notation for "global" elements; if $x \in X$, then the corresponding function $1 \rightarrow X$ can be denoted $\langle x \rangle,$ since by definition, this is an element of $X^1$.