by yakubin · 5y ago · 0 comments
Only for rational numbers. Doesn't work for real and complex numbers.
> It's even a useful thing to do, how else would you define multiplication?
Axiomatically, not algorithmically.
How exactly are you going to present multiplication of real numbers axiomatically without essentially including an axiom that bootstraps everything from repeated addition?
I suppose you can try defining the reals as "the unique complete ordered field" or the complex numbers as "the unique algebraically closed field of characteristic zero with cardinality c," but I don't think either of those are pedagogically useful to someone who is still learning what multiplication is.
The construction is rather involved but if we're only interested in the reals for now you can think of it as defining a real number by a set of rational numbers, in particular define a particular "real number" to be the set of all rational numbers less than it, for example sqrt(2) is defined to be the set of all rationals p/q such that p^2/q^2 < 2. We can "recursively" define addition of these real numbers in terms of addition of rational numbers because to add two reals you "just" have to add all the rationals in their respective sets.
In general there is no sensible algorithm to do anything in the real numbers, since most real numbers aren't even computable (there is no way to represent an arbitrary real number on a Turing machine).
This isn't the only case of infinite calculations that can't be computed in practice but that mathematics use all the time anyway; and it reflects quite well the fact that multiplying irrational numbers isn't something that one can do practice. There is no problem with it.
There are countable/computable/constructable subsets of the reals where multiplication has a finite algorithm and is it repeated addition.
One example is the algebraics, as well as extensions the including a few special constants like pi. These are the subsets of the reals most commonly used for math and science. So in a wide range of problems areas, multiplication is not just repeated addition.
Thinking of multiplication as repeated addition also won't explain anything about it. It's a separate operation. Deal with it. For similar reasons, you can't calculate x-th power of a number, when x is irrational, by decomposing it into exponentiation and roots.
This metaphor is just training wheels. At some point you should lose it.
Together with the notion that "multiplication is repeated addition" comes the notion that numbers are quantities. Only some of them are, and this isn't really what makes them numbers. Now what exactly gets repeated, when you don't have quantities?
You might see the natural numbers as training wheels for higher mathematics, but number theorists might disagree...
I also didn't say natural numbers are training wheels, just this metaphor, which to use HN lingo: doesn't scale.
People are just bit sloppy, and say algorithm when they mean something slightly different.
See https://stackoverflow.com/questions/28841260/what-is-the-dif... and https://en.wikipedia.org/wiki/Corecursion
Basically, you don't want an 'algorithm' here to produce the whole number.
All you need is some scheme that will produce the next digit in finite time (and the next one and the next one etc).
Also, an irrational exponent is the product of component factors.
b = Prod(0,inf) a^[x_i * 10^(-i)] = a^x
So even with irrational numbers, operations can be decomposed - such as exponentiation into multiplication of integer exponents and roots.
Which makes sense, because in the sequence definition of reals you need a way to generate the resulting sequence from the two original sequences.
I think you’re trying to claim more than is true.
> In mathematics and computer science, an algorithm (/ˈælɡərɪðəm/ (About this soundlisten)) is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems or to perform a computation.
Newton's method is finite too. You perform finitely many iterations. It doesn't calculate roots. It calculates their approximations.
It's probably a tomato/tomato kind of thing, but I'm only objecting to the 'algorithm' part of parent's comment.
Complex numbers aren't really relevant, in my opinion, because they are usually introduced as an extension of the rules for reals and polynomials. To multiply two complex numbers, you can totally forget that i is imaginary, do the multiplication as if it's just an ordinary variable, then substitute "i" back in. But that relies on being able to multiply polynomials, which would be difficult to define in terms of repeated multiplication.
To some extent all of mathematics is a lie. We can do multiplication on the reals because we have decided that it's allowed. It is reasonable to define multiplication at first as repeated addition and then define a way to extend that to the reals that is consistent with the first definition.