Rules for operating number systems

Worldwide agreement determines the sequence of mathematical calculations

Links within this page:

Basic Operations

Any number system has two main operations: these are addition and multiplication. Subtraction and division are subsidiary operations.

Laws governing operations

All number systems obey the following five laws:

  1. It does not matter in what order two numbers are added together.
    Symbolic representation: ` a + b = b + a. `
  2. It does not matter how you group several numbers when they are added together.
    Symbolic representation: ` (a + b) + c = a + (b + c). `
  3. It does not matter in what order two numbers are multiplied together.
    Symbolic representation: ` a times b = b times a. `
  4. It does not matter how you group several numbers when they are multiplied together.
    Symbolic representation: ` (a times b) times c = a times (b times c). `
  5. If the sum of two numbers is to be multiplied by a third number, this is the same as multiplying each of the two numbers by the third number separately and then adding the two results together.
    Symbolic representation: ` a times (b + c) = (a times b) + (a times c). `

Order of operations

In mathematics and computer programming, the order of operations is a collection of rules that reflect conventions about which operations to perform first in order to evaluate a given mathematical expression. These rules are formalized with a ranking of the operations. The rank of an operation is called its precedence, and an operation with a higher precedence is performed before operations with lower precedence. Calculations generally perform operations with the same precedence from left to right,

Conventional order

  1. Parentheses
  2. Exponentiation (powers and roots)
  3. Multiplication and division
  4. Addition and subtraction

BODMAS and PEMDAS are both acronyms that describe the order of operations in mathematics.
  BODMAS stands for Brackets, Orders, Division, Multiplication, Addition, and Subtraction.
  PEMDAS stands for Parentheses, Exponents, Multiplication, Division, Addition, and Subtraction.
However, PEMDAS tends to be used in the United States, while BODMAS is the common version used in the United Kingdom. However, not all schools teach these acronyms.
Some people favor the use of brackets to emphasize the equivalence of operations, which is then decided in the read-from-left-to-right precedence:
  BO(DM)(AS) … PE(MD)(AS)



Subtraction & Division

The above laws do not hold for subtraction or division or for mixed calculations that include subtraction and division as well as addition and multiplication.


Subtraction

Subtraction could be regarded as the addition of a negative number:
` 3 - 2 = 3 + (-2) `
The laws for addition will then hold:
` 3 + (-2) = (-2) + 3 `


Division

Division can be regarded as multiplication by a reciprocal; that is by one divided by the number being used. For instance:
` 4 ÷ 3 = 4 times 1/3 `
The rules for multiplication will then hold:
` 4 times 1/3 = 1/3 times 4 `


Zero

If zero is added to a number, that number is unchanged.
` a + 0 = a `


Unity

Unity (or one) does a similar job for multiplication. Any number mltiplied by unity remains unchanged:
` a times 1 = a `



Rules for negative symbols


Multiplication: unlike signs

If two numbers are to be multiplied together and their signs are unlike, multiply their absolute values and prefix a minus sign. (The absolute values are the values regardless of sign. This value is sometimes written as `|a|` where `a` is the given number.)
Example: `-7 times 4 = ?`
`|4| times |7| = |28|`
The signs are different and the answer is therefore `-28`.


Division: unlike signs

If a number is to be divided into another number and their signs are different, the result is the division of the absolute values prefixed by a minus sign.
Example: `63 ÷ -9 = ?` or `63 ` / ` -9 = ?` or `63 / -9 = ? `
`|63| ÷ |9| = |7|`
The signs are different, therefore the answer is therefore `-7`.


Multiplication and division: like signs

For multiplication or division of numbers with like signs, multiply the absolute values and give the answer a plus sign.
Example: `-a times -b = ab `


Addition

If signs are alike there is little problem.
Example: `(-3) + (-4) = -7 `
If the signs are unlike, find the difference between the absolute values and prefix the sign of the greater number.
`-17 + 4 = -13 `


Subtraction

If one number is to be subtracted from another, change the sign and add,
Example: `52 - (-67) = 52 + (+67) = 119 `
`(-a) - (-b) = -a + (b) = b - a `



Rules for indices

Symbol: The power to which a number (the base) is taken is shown by a small number just above and to the right of the original number. This is called the index.
Example: What is the fifth power of 2?
`2^5 = 2 times 2 times 2 times 2 times 2 = 32 `
The base is 2 and the index is 5.


Multiplication

If two numbers which are powers of the same base are multiplied together, the indices must be added.
Example: `a^2 times a^5 = ? `
`a^2 times a^5 = (a times a ) times (a times a times a times a times a) = a^7`


Division

If one number, a power of some base, is to be divided into another, this being another power of the same base, the indices must be subtracted.
Example: `a^5 ÷ a^3 = ? `
`a^5 ÷ a^3 = (a times a times a times a times a) / (a times a times a ) = a^2`
Note the base is a, the indices are 5 and 3 Subtracting them gives the new index of 2.


Meaning of a zero index

The division rule requires subtraction of the indices:
The division rule requires subtraction of the indices: `a^2 ÷ a^2 = a^0 `
But `a^2 / a^2 = 1` Therefore `a^0 = 1`
Rule: Any base taken to the power of zero is equal to 1.


Indices taken to a power

If three elements, `a^2`, are multiplied together:
Example: `a^2 times a^2 times a^2 = (a times a) times (a times a) times (a times a) = a^6 `
That is to say: `(a^2)^3 = a^(2 times 3) = a^6 `
Rule: powers of powers: Any base taken to some power taken to some power, multiply the indices together. Also note that reversing the indices gives the same result; that is:
`(a^2)^3 = (a^3)^2 = a^6 `


Meaning of a fractional index

The index 1 merely shows that the number is to be left as it is, thus `a^1 = a`.
The law for the multiplication of two numbers that are powers of the same base requires that the indices be added. It seems necessary, therefore, that
`a^(1/2) times a^(1/2) = a^1 = a `
It follows that `a^(1/2)` must be a number which multiplied by itself gives `a`, that is, it must be `sqrt(a)`. From the rule for powers of powers we have
`(a^(1/2))^2 = a^(1/2 times 2) = a^1 = a`

A fractional index such as `a^(1/3)` indicates a cube root, since
`a^(1/3) times a^(1/3) times a^(1/3) = a^(1/3+1/3+1/3) = a^1 = a `
By the multiplication rule for powers, `(a^(1/5))^3 = a^(3/5) `, which thus equals fifth root of `a` cubed.
The denominator gives the root of the base of a fractional index, while the numerator indicates how many of those divisions are to be taken.
Example: find the eighth root of the base a, and take to result to the fifth power. `a^(5/8) = root{8}{a^5}`
If `a = 256 => 256^(1/8) = 2 ; 2^5 = 32 therefore 256^(5/8) = 32 `


Meaning of negative indices

A negative index indicates a reciprocal, that is, it shows one over whatever power is taken. Examples:
`a^(-3) = 1/a^3 `       `2^(-3) = 1/2^3 = 1/8 `       `10^(-1/2) = 1 / 10^(1/2) = 1/sqrt(10) `



Quadratic equations

Quadratic equations are second order polynomials in which the variables have a maximum power of 2. These equations have the general form `ax^2+bx+c=0` with the three coefficients: `a`, `b`, `c`. For example, the equations `4x^2+x+2=0` and `2x^2-2x-3=0` are quadratic equations.
The solution to the quadratic equation is given by two numbers `x_1` and `x_2`. The quadratic equation can be expressed in the form of: ` (x - x_1)(x - x_2) = 0`.

There are three common ways of solving quadratics:

  1. By factorising.
  2. By completing the square.
  3. By using the quadratic formula.

Solution by factorising

`x^2 + 5x + 6 = 0 `

If we are to factorise `x^2 + 5x + 6 ` we need two numbers of which the sum is 5 and the product 6. The numbers are 3 and 2 and the factors are `(x+3)` and `(x+2)`. Therefore,
`(x+3)(x+2) = 0 `
If two expressions have a product of zero, one of them must be equal to zero. Therefore either `x+3=0` or `x+2=0`. the first will give `x=-3`, the second will give `x=-2`. These values are the roots of the equation.


Solution by completing the square

Example: `ax^2+bx+c=0` => `2x^2 + 3x + 1 = 0   (a=2,  b=3, c=1)`

We have to make the left-hand side into a perfect square.

  1. Isolate the variable terms on one side.
    `2x^2 + 3x + 1 = 0   (a=2,  b=3, c=1)`
  2. Make the coefficient of `x^2` equal to `1` by dividing by its coefficient `a`
    `b/a = 3/2 ,  c/a = 1/2 => x^2 + (3/2)x + 1/2 = 0 `
  3. To complete the square:
    1. find half the coefficient of x i.e. ` (1/2 . b/a) = 3/2`
    2. square it: ` (1/2 . b/a)^2 = b^2/(4a^2) = 9/16`
    3. and add it to both sides of the equation
      `x^2 + (3/2)x + 1/2 + 9/16 = 9/16 `
    4. take `c/a = (1/2)` from both sides:
      `x^2 + (3/2)x + 9/16 = 9/16 - 1/2 = 1/16 `
  4. The left side is a perfect square, factor it.
    `(x + 3/4)^2 = 1/16 `
  5. The right side is a perfect square, factor it. Take the square root of both sides:
    `x + 3/4 = ±1/4 ` => `x + 3/4 + 1/4` or `x + 3/4 - 1/4`
  6. `therefore x_1 = -1 ` or `x_2 = -2/4 = -0.5`

  7. Solution by using the quadratic formula

    When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and they are

    `x = (-b +- sqrt(b^2-4ac))/(2a) `

    The expression inside the square root is called the discriminant and is denoted by `Delta`.

    `Delta = b^2-4ac `

    This expressiion is important because it can tell us about the solution:


    Example: #1: `2x^2 + 9x + 1 = 0`
    `a=2,   b=9,   c=1 `   `(Delta > 0)`
    `x = -9 + sqrt(81 - (4 times 2 times 1))/(4) `
    `x = (-9 + sqrt(81 - 8))/(4) `
    `x = (-9 + sqrt(73))/(4) `
    `x = -0.115 `
    The other root is:
    `x = (-9 - sqrt(73))/(4) `
    `x = -4.385 `

    Example: #2: `3x^2 + 5x + 2 = 0`
    `a=3,   b=5,   c=2 `   `(Delta > 0)`
    `x_1 = -2`/`3, x_2 = -1 `

    Example: #3: `3x^2 - 6x + 3 = 0`
    `a=3,   b=-6,   c=3 `   `(Delta = 0)`
    `x_1 = x_2 = 1`

    Example: #4: `x^2 + 2x + 5 = 0`
    `a=1,   b=2,   c=5 `   `(Delta < 0)`
    There are no real solutions.



    References

    1. Stafford L.W.T. Business Mathematics archive.org Macdonald and Evans, Plymouth. 1979 2nd ed 384pp
    2. Guzman, Jefferson Huera. 20 Quadratic Equation Examples with Answers en.neurochispas.com/algebra 2024
    3. National Science Foundation: Libretext — Mathmatics. 11.4: Solve Quadratic Equations Using the Quadratic Formula math.libretexts.org/Courses/
    4. Wikipedia Order of operations en.wikipedia.org/wiki/