• ☭SaltyIcetea☭@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    1 month ago

    my calculator disagrees.

    and i would too, this is basically
    6÷2(1+2) = 6÷2×(1+2) 6÷2×3

    while you resolve brackets first, you still go left to right. you would get 1 if you did
    6÷(2×(1+2))

    the issue is the missing multiplication sign between the 2 and the brackets, thats why i always write them even if it is not strictly required

    • morphballganon@mtgzone.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      you still go left to right

      Unless there’s implied multiplication, which there is. Then you do that before the explicit division.

    • ChaoticNeutralCzech@feddit.org
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      CASIO calculators say 1, and I think it’s more intuitive with “÷2π” being equivalent to “÷(2×π)” rather than “÷2×π”. It took me a while to figure out why my results were almost but not quite one order of magnitude wrong after I was forced to switch to TI.

      • Atomic@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        No… just no. All you’ve done is managing to confuse yourself.

        What you want it to say is 6÷(2(2+1)) = 6÷6 = 1

        But what you actually wrote is (6÷2)2(2+1) = 36÷2 = 18

        Adding a space between the ÷ and 2(2+1) is not a replacement for a parentheses.

        • remon@ani.social
          link
          fedilink
          arrow-up
          0
          ·
          1 month ago

          The precedences go like this:

          parentheses > exponents > (multiplication = division) > (addition = substraction)

          If you encounter operators with the same precedence (like multiplication and division) you go by the order they appear in the equation, left to right. That is how it works.

      • It can be both depending on how you handle operator precendence.

        PEMDAS definitely doesn’t result in 1, but in 9, since under PEMDAS multiplication and division have the same priority (and thus should resolve left-to-right). So, you should resolve to 9 (6/2(2+1) => 6/2(3) => 6/23 => 33 => 9).

        However, there’s also PEJMDAS, which suggests that implied multiplication has an operator precedence greater than regular multiplication/division (J for Juxtaposition). This version says you should do 6/2(2+1) => 6/(22 + 21) => 6/(4+2) => 6/6 => 1.

        The issue is that there is no universal agreement on which is correct. Most textbooks don’t even use the / operator, but instead rely on writing out the full fraction like ⁶⁄₂₍₂₊₁₎ or ⁶⁄₂(2+1). This removes any ambiguity there might be, and thus they don’t touch on which one is actually correct.

        Most (but not all) calculators these days will treat implied multiplication the same as regular multiplication, so you get 9 in the given example. Most programming languages do the same, or outright disallow implied multiplication because it only confuses people. Academics won’t ever use the ambiguous notation and will make sure to remove any ambiguity by either adding parentheses or using a notation like ⁶⁄₂₍₂₊₁₎, which makes things much more clear.

        Neither 9 nor 1 is wrong, the question is just stupid.

    • KC_Royalz@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      I hate math, my teacher taught is as first in last out and to this day I still get confused. The answer is 9 right?

      • remon@ani.social
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        Yes, at least by the most common agreed on convention. Almost any mathematician, programming language, search engine or spreadsheet software will say it’s 9. It is for all intents and purposes the right answer.

        • carmo55@lemmy.zip
          link
          fedilink
          arrow-up
          0
          ·
          1 month ago

          There is no right answer. It just depends on convention. It’s like color vs colour, neither has been shouted down from the heavens to be the only way to write something, it depends on culture.

    • BurntWits@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      I was taught BEDMAS in school, so slightly different order. I was also taught that DM and AS are not specifically in that order, but rather left to right of the equation, in the same lesson. I’m not sure why some schools aren’t doing it that way.

    • Reyali@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      I’m guessing confusion is coming from those taking PEMDAS literally as that order? Rather than PE(M|D)(A|S), like it’s supposed to be?

      • cattywampas@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        It’s also convoluted by the notation of the multiplication. When it’s written like this, many assume that you need to resolve that term first since it involves parentheses.

      • FishFace@piefed.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 month ago

        It’s also because writing multiplication without a symbol creates a tightly bound visual unit that is typically evaluated before other things. If you see an exercise like, “what is 4x²/2x” most people answer “2x” not “2x³”. But this convention is rarely taught explicitly, so it’s ripe for engagement bait.

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          1 month ago

          There’s a reason why the conventional division symbol requires grouping its terms.

          If you see an exercise like that, the exercise is bad and your teacher must be educated. Now, try putting that into a computer language and see what comes out.

          • FishFace@piefed.social
            link
            fedilink
            English
            arrow-up
            0
            ·
            1 month ago

            I’m talking about exercises in textbooks, and you can find enough examples that writing them off as “the exercise is bad” is not really a good enough response.

            The only way the exercise is bad is if it causes confusion in the people who are using the textbook. Those students have been exposed to the conventions of the textbook in question; they’re not people who were brought up on some other convention. You do see inline division and the vast majority of people interpret an expression like that above the way I said, so it’s not in practice confusing.

            It’s not realistic to demand that every textbook uses the same conventions. It is realistic to demand that they lay out such conventions explicitly, which they unfortunately don’t.

            • marcos@lemmy.world
              link
              fedilink
              arrow-up
              0
              ·
              1 month ago

              So what? Those books are bad, at least on this specific way. They should be fixed.

              It’s perfectly realistic to demand that teachers only use good books. Textbooks should explain things, not confuse.

        • 0ops@piefed.zip
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 month ago

          tightly bound visual unit

          I think you nailed it on the head. The expression isn’t technically ambiguous, there’s exactly one solution, and neither is the notation incorrect, just unconventional. In this case though, forgoing convention makes the expression typographically misleading. Hence a reason why we have these conventions for writing out expressions in the first place: to visually reinforce the order of operations thereby making expressions as easy to read as possible. So it’s not written wrong per se, just unnecessarily confusingly.

  • kek_kecske_31@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    This is pure braindeath for the 100th time still. We, mathematicians always come up with small abuse of notations to make life easier. No mathematician is like, this is the only way you could go you charlatan. That being said, write equations and formulas in a way that the people you wrote them for (even if yourself) will understand. That’s what matters. If the formula is ambigous for the intended reader, then it is a bad formula or the notations are not presented clearly enough.

  • ryathal@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    Math should be taught with postix or reverse Polish notation. It removes this ambiguity as the order of operations is left to right.

    • FishFace@piefed.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      But it’s not so great for polynomials and other more complicated expressions which you’re not just evaluating, but rather manipulating algebraically:

      3 y × 3 ^ 4 y × 2 ^ + -2 y × + 3 +

    • YiddishMcSquidish@lemmy.today
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      I’m my head cannon, I imagine it as a /. Where the left is the top of a fraction, and the right the bottom. This only works in very simple equations though.

  • yermaw@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    We discovered mathematics, the unflinching language of reality itself, and then managed to make it ambiguous.

    If i was an alien id give humanity a big hair-tussle like a dog.

  • AHemlocksLie@lemmy.zip
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    The P in PEMDAS just means resolve what’s inside the parentheses first. After that, it’s just simple multiplication with adjacent terms, and multiplication and division happen together left to right.

    6÷2(1+2)

    6÷2(3)

    3(3)

    9

    • rapchee@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      would you say the same thing if the division was written out like a line under 2(3) and under that 6
      idk how this’ll come out but something like this:
      2(1+2)
      -----------
      6

      edit : wow i did a formatting thing
      edit2: i got it (ish)

      • AHemlocksLie@lemmy.zip
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        In that case, I’d say the answer is 1. Top and bottom are each resolved to the fullest extent possible before dividing top by bottom. It’s equivalent to (top)÷(bottom), but it’s clearer and preferable if you can easily format that way in my opinion, just harder on a computer.

    • Mistic@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      Usually, no sign before the bracket means juxtaposition. Scientific calculators do account for it, while regular ones may not.

      So 2(1+2) is really (2+4)

      Compare 2/2x and 2/2×X where x is (1+2)

      The first is 2/(2+4)=1/3, the second is (2/2)×(1+2)=3

      Also, there’s no real rule about solving left to right due to associative and commutative properties: 1×2×3 = 1×(2×3) = (1×2)×3 = 3×1×2 = 2×1×3 = 6

    • mic_check_one_two@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      This is actually a generational thing. Millennials were taught “PEMDAS”:

      1. Parenthesis
      2. Exponent
      3. Multiplication
      4. Division
      5. Addition
      6. Subtraction

      But younger generations have been taught “BEDMAS” instead:

      1. Brackets
      2. Exponent
      3. Division
      4. Multiplication
      5. Addition
      6. Subtraction

      Notably, Division and Multiplication are swapped on PEMDAS and BEDMAS, to make this “both happen at the same time” more straightforward. But that only applies if the entire operation can happen at the same time.

      For instance, let’s say 6/2(3) compared to 6÷2(3). At first glance, they both appear to be the same operation. But in the former, the 6 dividend would be over the entire 2(3) divisor. Which means you would need to simplify the divisor (by resolving the multiplication of 2•3) before you divide. So the former would simplify to 6/6=1, while the latter would divide first and become 3(3)=9.

      Technically, if you wanted to be completely clear, you would write it using multiple parenthesis as needed. For instance, you would write it as either:
      (6÷2)(3)=9 or 6÷(2(3))=1 to avoid the ambiguity. Then it wouldn’t matter if you’re using PEMDAS or BEDMAS.

      • AHemlocksLie@lemmy.zip
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        But in the former, the 6 dividend would be over the entire 2(3) divisor.

        I have never heard of or seen an example of anyone using / and ÷ in different ways. If you want multiple terms in your divisor, either write it as a large fraction with all relevant terms in the dividend or divisor, or use parentheses. This just seems like sloppy notation to me.

        • mic_check_one_two@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 month ago

          The slash was just because MarkDown doesn’t really make mathematical notation easy. The point is that with a slash, the 6 is over the entire 2(3) divisor. It’s the difference between these:

          You can even see that the automatic solution (in yellow) parses the two differently. In the first example, it correctly resolves the 2(3) first, because you should always simplify both the top and the bottom as much as possible before you resolve the division. But in the second, it parses the 6÷2 first, because it is left ambiguous. The slash is literally the horizontal bar, putting the dividend above the entire divisor. Except it’s in a single line, instead of taking up three lines of text for a single operation.