• pixelscript@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 month ago

    This is a question I see from time to time, and it’s a good question to ask.

    Your question as I understand it can be phrased another way as:

    The square root of -1 has no defined answer. So we put a mask on it and pretend that’s the answer. We do math with the masked number and suddenly everything is fine now. Why can’t we do the same thing to division by zero?

    The difference is that, if you try to put a funny mask on the square root of -1 and treat it like a number, nothing breaks, but if you try the same thing with a division by zero, all sorts of things break.

    If you define i = √-1, that is the only thing i can ever be. That specific quantity. You can factor it out of stuff, raise it to that exponent, whatever. And if it is ever convenient to do so, you can always unmask it back into that thing, e.g. i^2 = (√-1)^2 = -1. All the while, all the already existing rules of math stay true.

    A division by zero isn’t like this, because if you tried it, every number divided by zero would equal to the same thing. If we give it a name, say, 1 / 0 = z, then it would also be true that 2 / 0 = z. We could then solve both sides for zero:

    1 / z = 0

    2 / z = 0

    then set them equal:

    1 / z = 2 / z

    then multiply both sides by z:

    1 = 2

    which is a contradiction.

    i doesn’t have this problem.

  • homura1650@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 month ago

    You get this property in algrabraic structures called “wheels”. The simplest to understand wheel is probably the wheel of fractions, which is a slightly different way of defining fractions that allows division by 0.

    The effect of this is to create 2 additional numbers: ∞ = z/0 for z != 0, ⊥, and ⊥ = 0/0.

    Just add infinity gives you the real projective line (or Riemen Sphere if you are working with comples numbers). In this structure, 0 * ∞ is undefined, so is not quite what you want

    ⊥ (bottom) in a wheel can be thought as filling in for all remaining undefined results. In particular, any operation involving ⊥ results in ⊥. This includes the identity: 0 * ⊥ = ⊥.

    As far as useful applications go, there are not many. The only time I’ve ever seen wheels come up when getting my math degree was just a mistake in defining fractions.

    In computer science however, you do see something along these lines. The most common example is floating point numbers. These numbers often include ∞, -∞ and NaN, where NaN is essentially just ⊥. In particular, 0 * NaN = NaN, also 0 * ∞ = ⊥. The main benefit here is that arithmetic operations are always defined.

    I’ve also seen an arbitrary precision fraction library that actually implemented something similar to the wheel of fractions described above (albeit with a distinction between positive and negative infinity). This would also give you 0 * ∞ = ⊥ and 0 * ⊥ = ⊥. Again, by adding ⊥ as a proper value, you could simplify the handling of some computations that might fail.

  • T0Keh16@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 month ago

    This depends on what properties you want your number system to satisfy. Usually you want for any three numbers a,b,c to satisfy

    1. Associativity of addition: a+(b+c)=(a+b)+c This is quite useful, so we don’t want to give this up

    2. Commutativity of addition: a+b=b+a Also useful but you could get around that if you really want to, but for our purposes let’s keep it

    3. An additive identity (or zero): 0+a=a=a+0 You want a zero, so this is needed

    4. Additive inverses: There exists x such that a+x=0 (here x=-a); you also want this

    5. Associativity of multiplication: a*(bc)=(ab)*c Same as above, you want this property

    6. Commutativity of multiplication: Useful but not necessary

    7. A multiplicative identity (or one): 1a=a=a1 Usually with 1=/=0, also useful

    8. Multplicative inverses for nonzero elements: Not that necessary, there are useful number systems without this (like the integers …,-1,0,1,…)

    9. Distributivity: a(b+c)=ab+ac, (a+b)c=ac+bc You ant this, as it links addition and multiplication and this is quite desirable.

    If you assume 4. and 9., you get 0a = (0+0)a=0a+0a, hence 0=0a. This means that you would have to give up distributivity wihin your number system, however distributivity is what links addition and multiplication together, hence your question would just be “what if we have two binary operations that don’t really interact with each other?” and the answer is: Maybe there are useful cases?

    Edit: I forgot about losing property 4, in which case some examples are found in the following math stackexchange post

    • LovableSidekick@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      Interestingly 00 doesn’t always mean 1, sometimes it’s treated as undefined - depends on what type of mathematical problem you’re working on.