Hacker News new | ask | show | jobs
by sls 2474 days ago
The comment to which you replied says that thinking about multiplication as "just" repeated addition is problematic, so let's look at that.

Consider 3 x 2. If we take that approach, it seems ok - we understand it to mean "add together 3 2's" - 2 + 2 + 2, which gives the correct answer of 6.

What about -3 * -2? What does it mean to add a negative number of times?

What about pi * pi? What does it mean to add something pi times?

What about the matrix M * the matrix N?

etc. The parent's point is that this repeated addition thing is just an algorithm one can use to calculate a multiplication for some operands, specifically whole numbers, not a general definition of the operation of multiplication.

3 comments

If we want to define π×π, the best we can do is some kind of algorithm for generating an approximation to π (e.g. as a continued fraction or as a positional decimal fraction) to any desired degree, and then an algorithm for multiplying such approximations. We can prove some bounds on the error introduced by our multiplication algorithm, and that gives us a way of approximating the product to any desired precision.

For example if we want to know π^2 to about 3 decimal digits (~9.87), we can start by using an approximation of π to about 4 decimal places (~3.142) and then multiplying the two decimals.

For rational numbers, multiplication algorithms are usually built on breaking a number down into constituent pieces, multiplying every pair of pieces from the two multiplicands, and then adding up all of the partial products.

Matrix multiplication has the additional complication that the elementary terms involved (entries in different places in the matrix) cannot be added to each-other. But the basic procedure is still the same: break the two multiplicands down into basic units which we already know a multiplication table for, compute all of the partial products, then sum them up.

I don't agree that a definition of multiplication that includes transcendentals such as pi must be numerical. In fact, to the extent that numerical approximations are approximations _of_ something, the thing they would be approximating is the actual value of the operation of multiplication being applied to pi and pi. The only reason we're talking about algorithms at all was to distinguish between them and definitions.
Well, that’s a philosophical rather than mathematical question. I don’t really believe in a concept of “actual value” outside of the context of computations (though I don’t mind conceding it as a matter of convenience and social convention, since the distinction almost never matters for practical purposes). I am not an expert, but mathematicians have investigated this, https://en.wikipedia.org/wiki/Computable_analysis

We can treat π purely symbolically if we like, but as soon as we want to do anything useful with it we need some kind of approximation or algorithm.

I am familiar with the constructivist family of ideas. Obviously I agree this a question of philosophy, specifically the philosophy of mathematics. (So not "rather than", since foundations of mathematics is a branch of mathematics.) And because adopting a constructivist approach to mathematics means adopting different ideas about what a mathematical definition _is_ or _can be_, I have to say that it's a bit disingenuous to introduce this context only after engaging in the above discussion.

For example, if someone asks you to explain Euclid's proof of the infinitude of the primes, and you say that Euclid did not provide any such proof and nothing more, I think it's quite disingenuous. It would be more proper to say, from a constructivist view, the argument Euclid made isn't a valid proof, and then either explain the proof in the logical context in which it was made or decline to.

In this case, the point of discussion was separating the definition of multiplication from an algorithm implementing it. It's quite unfair to silently take a position that a mathematical definition without an algorithm isn't valid or meaningful and then on that basis argue that only numerical approximations to transcendentals have meaning.

So many common mathematical concepts such as "the integers" have no meaning in a constructivist approach that it's not sensible to engage in mathematical discussion without establishing that one's fundamental basis of approach varies so widely from the common one.

> What about -3 * -2?

My son actually asked me that a while back (or rather, “why does a negative times a negative make a positive?”), and I honestly didn’t have a very satisfying answer. The best I could come up with was to go back to the definition of multiplication as repeated addition and then start with multiplying/repeated-adding a negative number by a positive number: that would work backward on the number line and give you a negative number. Then, since multiplication is commutative, a positive number multiplied by a negative number must behave the same way: multiplying a positive by a negative causes the negative to move backwards. So, if multiplying a positive by a negative moves it the “other way”, multiplying a negative by a negative must move the first number to the right.

It works, but it’s not as intuitive as I would have liked - I did better with why negative exponents are 1/x^n and why the angles in a triangle add up to 90 degrees.

The following page explains this one pretty well I think, skip to the "A proof" at the bottom: http://mathforum.org/dr.math/faq/faq.negxneg.html
Easy.

-3 x -2, multiply signs first: +, remainder: 3x2 repeat 2 3 times and add; 2 + 2 + 2 = 3, remainder: 0

3.141 * 3.141, multiply signs first: +, remainder 3x2 repeat 3.141 3 times and add; 3.141 + 3.141 + 3.141 = 9,432, remainder: 3.141 * 0.141

shift decimal: 3.141 * 1.41, remainder: 3.141 * 1.41

3.141 * 1.41, repeat 3.141 1 times and add: 3.141 = 3.141, remainder: 3.141 * 0.41

shift onto result: 9.432 + 0.3141 = 9.7461, remainder: 3.141 * 0.41

shift decimal: 3.141 * 4.1

repeat 3.141 4 times and add; 12.564, remainder: 3.1410.1

shift onto result: 9.87174‬

shift decimal: 3.141 1

shift onto result: 10,053764‬

result: 9,875881‬

check back with calculator: 3.141 * 3.141 = 9,875881

Multiplication can be represented as a number of additions and shifting the results of substeps over the decimal point

No one is arguing that one cannot implement multiplication algorithms using addition. In fact, one can do it with just NAND. But the definition of multiplication isn't in terms of NAND or addition.