• 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/2*3 => 3*3 => 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/(2*2 + 2*1) => 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.

      • remon@ani.social
        link
        fedilink
        arrow-up
        5
        arrow-down
        2
        ·
        edit-2
        18 hours 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.