Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: [Phys-L] axes, labels, coordinates, functions, etc.

On 8/26/20 7:28 AM, Carl Mungan via Phys-l wrote:

This is a minor matter, but it bothers me and I’m wondering if
there’s an alternative?

Suppose we have a graph. Let’s say it’s position x in meters vs time
t in seconds for definiteness. Draw the axes. Label with a symbol
what is being plotted on each axis. Sketch in some arbitrary curve.
Choose an arbitrary point on that curve. Draw dashed lines that run
parallel to each axis and intercept the other axis. Label with a
symbol each of these intersection points to indicate the coordinates
of that arbitrary point.

Okay, what did you come up with for those two sets of labels (those
labeling the axes and those labeling the coordinates of the point)?

I come up with the same labels in both cases, namely x on the
vertical and t on the horizontal.

It bothers me to have the same labels in two different places on the
axes like that (one at the ends of the axes perhaps, and one at some
arbitrary “intermediate” point along them).

Good question! Nothing minor about it IMHO. We are in the business
of communicating technical ideas, and this seems like exactly the
sort of thing we should examine closely.

The question raises several issues. I'm not sure which of them were
intended, and which are merely collateral. So let me just say a few
things that might be helpful.

1) This is probably not the intended point, but it's important nevertheless.
Talking about "axes labels" is probably not the optimal way of framing the
issue (no matter what the issue is). The axes almost never capture the
essential physics. Those "dashed lines" are vastly closer to the physics.
Note the contrast:
-- The x-axis is horizontal.
-- The lines of constant x are vertical (in this case).

The labels attach to the contours of constant x. Once you have those
contours and those labels, you can dispense with the axis entirely.
If the axis is visible at all, it's just for show.

You will note that every graph I've made in the last many, many years shows
the grid of contours (not just the "axes").

Note (!) there are cases where the contours of constant x are not perpendicular
to any axis, in which case anything called "the" x axis is just a source of
confusion. For the next level of detail on all this, see:

2) At the introductory level, the notation for functions is a disaster. It
would be more-or-less logical to say that if f is a function, then f(x) is
just a number, namely the result we get when applying f to the definite value
x. In particular, given the Square function, Square(7) is a number, namely 49.

However, it is quite common for people to write f(x) and call it a
"function of x". For example:

Some possibly-useful suggestions are given in item(5) below.

3) Many of the things we think of as "variables" would be better thought of as
/fields/, which are a particular type of function The E-field is conceptually
a function of position. That is to say, at any particular position there is a
definite value of the E-vector.

For that matter, the coordinates are a function, namely a field, in this
sense. Let R be a completely abstract point. Then it has coordinates
x(R), y(R), and z(R) in some chosen coordinate system. The point R exists
and is independent of whatever coordinate system (if any) you choose.

This way of looking at things is particularly helpful in thermodynamics, where
there is a plethora of variables. Consider a homogeneous system, so physical
position has no significance. We still have an abstract thermodynamic state-
space. Let R be a completely abstract point in this space. It will have some
-- T(R) temperature
-- P(R) pressure
-- s(R) entropy density
-- ρ(R) mass density

However, just as E ambiguously refers to either a definite vector at a definite
position *or* the entire E-field, we ambiguously use T to denote either a
definite temperature value or the entire T-field.

You can write a function that calculates P as a function of ρ and T, but that
does not mean that P "is" a function of ρ and T. Rather, P is a physical
quantity unto itself, defined at each point in the abstract state-space, no
matter what method (if any) you use to calculate it.

4) Applying this to the example at hand: The vertical dashed lines can be
labeled x=1, x=2, x=3, et cetera. This is entirely correct. The label gives
the value of the x-field, valid at every point along the dashed line.

5) Sometimes you can clarify things enormously by using *lambda notation* .

Lambda notation is used to define functions. The lambda can be pronounced
"for all". For example:
Square = λ(x) {x*x}

where Square is a function. The RHS can be pronounced "for all x, give me
x times x". As before, we can apply this function to a specific argument:
Square(7) is 49.

The cute thing about lambda notation (unlike conventional Fortran-style
notation) is that we can define /anonymous/ functions:

λ(x){x*x} (13) is 169.

You can see first we define an anonymous function, then we apply it to the
argument (13) to obtain a specific result.

Note that all of the following are *exactly* the same function:
λ(w) {w*w}
λ(x) {x*x}
λ(y) {y*y}

Modern versions (since C++11) of the C++ language allow lambda-expressions
i.e. anonymous functions. The sigil [] is used in place of λ. For example:
[](int i) {return i * i;}

is the familiar Square function. Here's a complete working example:
#include <iostream>
using namespace std;

int main() {
cout << [](int i){return i*i;} (7) << endl;

In particular, you can solve the problem identified in item (2) above as
follows. If x=3, then f(x) is a definite number, which we obtain by applying
the function f applied to the argument 3 ... whereas λ(x) f(x) or equivalently
λ(q) f(q) is unambiguously a function.

Experts note: In the expression λ(x) f(x), the λ operator creates a whole
new context for the rest of the lambda-expression to live in. In particular
λ(x) creates a new temporary x-variable, independent of any earlier (or later)
definition of x.

So here is an elegant way to answer one of the questions that was asked:

If you want to label a *generic* point in the x,y plane, you can write
λ(x,y) ...

which is a way of saying
for each point (x,y) in this space, there is "..." something going on.

Conversely, if you want to label a particular (non-generic) point in x,y
space, it may be good to use subscripts (x₁, y₁) ... or grab onto the idea
that x and y are /functions/ of position and write (x(1), y(1)) or the like.

Here's another approach: You can write f∘x which denotes the /composition/
of the f-function with the x-function. This makes it clear that we are
considering x a field, i.e. a function of position, and f∘x is therefore
clearly a function of position also.

6) To answer a question that wasn't asked, but has a related answer:

Suppose we have a scalar field, such as the electrostatic potential. It is
a function, namely a function of position.

Now suppose we want to talk about a vector field. It is also a function of
position, but now the ordinate is a vector. That is, at each point in the
vector /space/ there is a vector /field/ in which the ordinate lives.

Here is one way (albeit not the only way) of creating a basis for such
vector spaces. The coordinate x is also a function of position. We can
calculate the gradient of x, aka the exterior derivative of x, denoted dx,
which is a unit vector in the direction of increasing x.

This is obvious and routine when x is an ordinary spatial coordinate ...
but the same trick works in thermodynamic state space, where the result is
not so obvious, but easy once you get the hang of it, and exceeeeedingly
powerful. It gives meaning to vector expressions such as
dE = P dV - T dS

which would be utter nonsense if misinterpreted in terms of scalars. See
which uses results from