Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to write a simple formula based on some work I've had to do with programming. In programming, I have the ability to write a class with certain properties. For example: A coordinate with x & y values.

I can then access these values like... point.x & point.y

What is the correct way to describe these objects and use their values in mathematical notation?

share|cite|improve this question
We usually write them as $(x,y)$. – wj32 Oct 31 '12 at 11:24
What kind of properties are you talking about? Ints, strings, vectors, lists...? – rbm Oct 31 '12 at 11:36
Ints and floats mainly. I'm just summarizing the solution to the problem given to me. – Dan Oct 31 '12 at 11:40
If we have a point $P$, we usually first write $P=(x, y)$ somewhere in the text, and after that, we can use $x$ and $y$ just like a programmer would write P.x and P.y. If you have several points (say $P$ and $Q$), we differ between them by adding indices, like $P = (x_P, y_P)$ and $Q = (x_Q, y_Q)$. – Arthur Oct 31 '12 at 11:45
Fantastic, Arthur. Just what I needed. – Dan Oct 31 '12 at 11:49
up vote 3 down vote accepted

The dot-notation is not common in Maths. Instead, you usually use indices, where the order of element and property might be reversed. Thus, $$ is usually referred to as $property_{element}$, where any name is usually single-lettered, and elements are also often identified by some number.

For example let $M=\{point1, point2\} $ be some set of two points, both with properties x and y. In the programming lanuage you would refer to them by point1.x, point1.y, point2.x, point2.y.

In Maths, you would usually identify the two points with numbers, thus, $M = \{1, 2\}$, and write $x_1, y_1, x_2, y_2$. But things can also be totally different, depending on how it is most comfortable for your purpose.

It is also ok to write $p_x$, $p_y$ for any $p \in M$, where it might be that $p = point1$ or $p = point2$.

Another alternative: it is always possible to represent properties by a function on the set of elements (just as properties can also be accessed with a function, e.g., point1.getX()). Thus, we could define the function $x : M \rightarrow \mathbb{R}$ to map to the x-coordinate of any given point from the set $M$ to its real value, and refer to it by writing $x(p)$ for any $p \in M$.

However, the universal answer to this question is that there is no universal answer :)

share|cite|improve this answer
Haha, thanks for that. I guess as long as my documentation also explains what is happening correctly, then I can use any of these options. Thanks for your help :) – Dan Oct 31 '12 at 11:55

For properties of mathematical values one uses functional notation, though notational variations exists. For instance for a complex number $z$ one could note its real and imaginary parts $\Re z$ (or $\operatorname{Re}z$) and $\Im z$ (or $\operatorname{Im}z$), its absolute value is written $|z|$ and its argument $\arg z$. However one often uses an indirect way to access these properties, so instead of saying "let $a=\Re z$ and $b=\Im z$" one would say "let $z=a+bi$", and instead of "let $r=|z|$ and $\phi=\arg z$" one would say "let $z=re^{\phi i}$" (with some luck the author would add: $a,b,r,\phi\in\Bbb R$ and $r\geq0$, to make this less ambiguous). In some cases the latter is virtually the only style used, for instance one could write the coefficient of $X^3$ in a polynomial $P$ as $\operatorname{coef}(X^3,P)$, but this is not often done; rather one would say "let $P=c_nX^n+\cdots+c_1X+c_0$" and then talk about the coefficient $c_3$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.