Hacker News new | ask | show | jobs
by sykh 2992 days ago
Think about the equation

x + 3 = 1

Typically we write that the solution is "x = –2". This to me is the most abusive form of usage for "=" in mathematics. The solution to the equation is –2. The solution to the equation x = –2 is also –2.

Solving the equation x = –2 is very easy. We can solve it just by looking at the equation. What we are really doing when solving an equation is transforming the original equation into a simpler equation with the same solution set. Tt gets tedious to write this all out so we just say things like "the solution is x = -2" when we've transformed the original equation to x = –2. This is weird because x is not the number -2. x is a variable that can assume a myriad of values. The only value of x that solves the equation is –2.

As the article states the abuse of the = sign in mathematics is rampant. We do it mostly without realizing it. In this sense mathematical language mimics human languages. All human languages are prone to abuse of rules and to shifting with the times.

The notation in mathematics, while much more precise than spoken human languages, is abused frequently and the purpose is to make things cognitively easier. The ancient Greeks didn't have symbols for numbers and in their mathematics they wrote everything out in Greek. This makes it very hard to do tedious calculations. Using symbols in lieu of writing out all the minutia makes doing math easier provided you learn the contextual meaning of the symbols. Over the centuries symbols have been introduced as a shorthand for complex ideas/objects/operations. If you want everything precisely stated then reading Principia Mathematica ought to cure you of this desire. Mathematics is written by humans for humans.

Code is written by humans for computers and hence the notation needs to be rigorously defined in the language you are using and why your code needs to be commented.

5 comments

Suppose x is an integer such that x + 3 = 1. Then, x is -2. There's no solutions here, just implications and an alternative way of defining the value of x.

I think variables in equations are not meant to express the existence of variance within an equation, but a sense of context-dependency of the value of x. At least, IMO.

There is a solution. An equation is really a question.

x+3 = 1

is asking the question, “what value for x makes x+3 the number 1?”

The polynomial x+3 is defined for all values in R, the base ring you are working in. We are trying to find the elements of R for which x+3 is the element 1.

An equation is an instance of equating.

A solution necessitates a question, and questions associated with equations involving variables aren't restricted to: what is set of possible values which satisfy those equations?

You are incorrect. This is not how mathematicians view a polynomial equation like the one I used as an example. That equation does have a solution.
I disagree. If you are saying 'the solution's is -2, you have to be clear what the problem is. This becomes clearer when you have a problem with multiple variables. Then saying 'x=-2, y=3', makes clear the value each variable is taking in the solution.
Solutions to equations in multiple variables are ordered tuples. For instance,

x y + 2 = 0

has infinitely many solutions. One of them is (1, -2).

I feel like that example counters your claim in two different ways.

First, (1, 2) only makes sense if you assume that x is first and y is second, or in other words that they correspond to X_1 and X_2 for some vector X. This is probably a reasonable assumption for x and y, but what if you have some other arbitrary choice of variables?

a ρ + 2 = 0

Then the only unambiguous way to write a solution is with explicit labels: a = 1, ρ = -2.

Second, another way to “solve” the equation “x y + 2 = 0” is: “y = -2/x, for any x ∈ ℝ \ {0}”. You could argue that this is also a different kind of “equation” than the one you started with: the reason it can be seen as a solution is not (just) that it’s simpler than the original equation, but that it provides an algorithm to enumerate the set of individual solutions, as well as the set of solutions given some proposed x value. (That is, a set with one or zero members depending on whether x = 0.) However, even if it is a different kind of object, there’s no way to represent it in standard notation that doesn’t conflate ‘questions’ with ‘answers’. If you really want to use tuples, you could go for “{(x, -2/x) | x ∈ ℝ \ {0}}”, which avoids the equals sign – but the ∈ is playing a similar role, an algorithm (enumerate all members of this set) disguised as a test (is this value a member of the set?).

edit: Upon further reflection, I might actually just be expressing violent agreement with the point you were trying to make. shrug

Polynomials in multiple variables always have the variables ordered. Sometimes the ordering is not important or explicitly stated but in reality they are supposed to be ordered.

If we start with x y + 2 = 0 we can apply the function

f(x) = x - 2

to both sides of the equation. This gives us the equation

x y = -2

This is a different equation than the one we started with but these two equations have the same solution set. Can go a step further and transform this equation to

y = -2/x

This equation has the same solution set as the first equation. All three equations are equivalent. Solutions are ordered pairs of numbers.

Commonly in basic courses like calculus we tell students that the last form is preferable and we write solutions as (x, -2/x). We call this set the graph of the equation but really it’s the solution set of the equation.

In algebraic geometry x y + 2 = 0 is preferable. The solution set is called an algebraic variety. The solutions are ordered pairs in affine space.

The rules of algebra, as taught in low level courses, are rules that allow one to transform a given equation into simpler equation. In one variable the goal is to end up with something like x = 3 because such an equation is easy to solve. The solution is the 1-tuple 3.

Not all sets are recursively enumerate so using enumerate as you did can cause problems.

Technically, people have polynomials with uncountably many variables, so you can't order them.
Each polynomial has only finitely many variables in it. If you were to work with uncountably many variables I assume one would impose a well ordering on those variables. I’ve never worked with a polynomial ring with uncountably many variables. No one is going to solve an equation with uncountably many variables so I’m not sure the point you are trying to make.
> Typically we write that the solution is "x = –2". This to me is the most abusive form of usage for "=" in mathematics. The solution to the equation is –2.

I disagree, though I think it's fine to think of a bare “-2” as a solution when you have a single variable, when you deal with equations or systems of multiple variables it breaks down. Sure, you can think of the solution in terms of untagged tuples when the variables have conventional orderings, but that just highlights that the lack of tagging the variable with the value is a shorthand, not the “true” form of the solution. And it's as much a shorthand in the one-variable case.

Let me be more precise. Assume x+3 is an element of R[x] with x an indeterminate and R a ring with characteristic not equal to 3. Then x+3 defines a natural map from R to R. The equation x+3=1 is just a shorthand way of asking for the pre-image of this map.

In two variables we get a map from R^2 to R^2and solutions are ordered pairs. By definition of an element of a polynomial ring over R the variables are ordered.

> Typically we write that the solution is "x = –2"

That is not overloading "=" at all. It is overloading the word "solution".

What your teacher probably told you is:

"x+3=1 is equivalent to x=-2 by .... Hence, the solution of x+3=1 is the same the solution of x=-2 (which is -2 in both cases). Since the solution of x=-2 is so obvious, we also say the solution is x=-2 to mean that it is the same solution as of the equation x=-2."

Same difference as in "Q:Would you like a large coffee or a small coffee? A: Large " The correct answers should only be either phrase "A large coffee" or "a small coffee", but the answer was an adjective.

I don’t know the precise definition of overloaded. I was merely claiming that the use of = in an equation, like a polynomial equation, is very much different than the use of = in something like the statement of the distributive property of the real numbers.

I’m a mathematician so it’s something my teacher said as such but something that I noticed consciously when I started doing some programming.

> x is a variable that can assume a myriad of values.

No it can’t. x in this case is a bound variable. It’s not that it just so happens to take on -2, but that it is already bounded to -2 to make the statement true.

It really says: There exists some x in Z such that x + 3 = 1. What is that x, or what is a proof of the statement? The answer is in the form of a logical implication.

Let’s assume we are talking about Q, the rationals. x+3 is an element of Q[x]. This element of Q[x] defines a natural map from Q to Q. The equation x+3 = -2 is equivalent to finding the pre-image of -2 of this natural map.

x is actually just, in the language of computer science, syntactic sugar. In reality x+3 is really the infinite tuple

(3, 1, 0, 0, .....)

>x+3 is an element of Q[x].

I think this is incorrect.

Lets continue to assume we are working over Q. Without further context I would take "x+3=-1" to mean that x,3, and -1 are all elements of Q. 3 and -1 being the obvious elements; and x being an a-priori unknown elements which we can easility derive to be 2.

Notably, x+3 is not a polynomial in the technical sense. If we wanted to consider x+3 a polynomial, we would be asking for the t value such that (x+3)[t] = (-1)[t]. Where (-1) is also a polynomial, and (g)[t] is the map Q[x] X Q -> Q given by standard polynomial evaluation.

Sure, this question is equivalent, but I see nothing in the original equation "x+3=-1" to suggest any involvement of formal polynomials.

x+3 is an element of the polynomial ring Q[x]. More precisely it is syntactic sugar for the infinite tuple

(3, 1, 0, 0, ....)

A polynomial ring in one variable is an infinite direct sum of the base ring with addition component wise and multiplication defined in a certain way. The expression x+3 meets the definition of a polynomial.

I know what a polynomial ring is. I am not questioning that the string "x+3" can be interpreted as an element of Q[x].

What I am questioning is the necessity to interpret "x+3" as an element of Q[x].

>The expression x+3 meets the definition of a polynomial.

Only if you take x=(0,1,0,...) and adopt the convention that any member q of the base field Q is assumed to represent qx^0 = (q,0,0,...).

That is to say, x+3 only meets the definition of a polynomial because you insist on interpenetrating it as such.

However, we can also handle "x+3=-1" without ever defining the notion of a polynomial.

Eg, we can say, suppose x \in Q such that "x+3=-1". From this premise, we can derive presisly what specific element of Q x must be.

In a more general setting, we might only be able to derive a set of potential values that x could have, or derive that x cannot possibly exist.

As I mentioned in my prior comment, I see no reason to intererperet the "x+3" in "x+3=-1" as a polynomial. If we were to do so, the question would be asking: find t \in Q such that (x+3)[t]=(-1)[t]. Where (g)[t] is polynomial evaluation.

Applying the definition of polynomial evaluation, we would get that the above equation implies: t+3=-1.

Are you now going to insist that "t+3" is a polynomial. Bearing in mind that we have defined t to be an element of Q, which was necessary to apply it as the second argument of polynomial evaluation; and we only got "t+3" as the output of polynomial evaluation, which is defined to result in an element of the base field.

We could modify are notion of polynomial evaltuation to instead be of the form R[x] X R[x] -> R[x], which also gives us (for free) the ability to apply polynomials to other polynomials. But if we were to do this, then when we say that the solution to "x+3=-1", is -4, we are taking "-4" itself to be a polynomial.

In practice this is fine (we identify the base field with the subring of degree 0 polynomials all the time). However, this entire approach breaks down when you start working with functions that do not fit within the framework of polynomial rings.

For instance, suppose I said that "(x+3)! = 120". Are you still going to insist that "x+3" is a polynomial?

What if I define a function id: Q -> Q. In the equation "id(x+3) = 2, are you still going to insist that "x+3" is a polynomial?

Only if you take x=(0,1,0,...) and adopt the convention that any member q of the base field Q is assumed to represent qx^0 = (q,0,0,...). That is to say, x+3 only meets the definition of a polynomial because you insist on interpenetrating it as such.

That’s what we mathematicians do. In the context of the original post it is absolutely clear that x+3 is a polynomial. There is no other reasonable interpretation.

When you write things like:

Notably, x+3 is not a polynomial in the technical sense. If we wanted to consider x+3 a polynomial, we would be asking for the t value such that (x+3)[t] = (-1)[t]. Where (-1) is also a polynomial, and (g)[t] is the map Q[x] X Q -> Q given by standard polynomial evaluation.

it gives the impression that you don’t know what a polynomial is. The second sentence I quoted is not true. (EDIT: see note below, my interpretation of what was written was wrong.)

Of course if you change context then different interpretations arise. Which of course is the whole point of my original post. Like all spoken languages mathematical language is nuanced. Things must be interpreted in context.

When presented with the equation x+3=-1 x+3 is a polynomial. -1 is a polynomial.

I gather you do not think x^2 - x + 1 = 0 is a polynomial equation. Is x^3+4x a polynomial? Is there any other reasonable interpretation using accepted mathematical conventions? Perhaps you don’t think 2/(x+3) is a member of R(x). What is it a member of then?

Edit:

x+3 is a polynomial that defines a natural map from R to R. To solve the equation x+3=-1 is asking for the pre-image of -1 of this map. This is what it means to solve this equation. It’s solution set is an algebraic variety. I see no other reasonable interpretation. The whole branch of algebraic geometry is about precisely this. Studying zero sets of polynomial equations.

That we teach people rules they can apply to find the answer does not detract that what is really going is as I’ve described and as you did describe with the second quoted text.