Mathematics · A worked example

1843–1844

Hamilton and Quaternions (1843): Why Multiplication Order Matters

Follow Hamilton’s 1843 quaternion discovery, learn the multiplication rules, and check two products that change when their factors are reversed.

William Rowan Hamilton in an 1885 autotype reproduction of an 1857 photograph; the complete supplied Library of Congress frame is retained.
4
Real components in a quaternion
16 October 1843
Discovery date
ij ≠ ji
Order changes the answer

The short answer

For ordinary real numbers, reversing the factors leaves a product unchanged. Hamilton’s quaternions provide a precise way for that rule to fail while arithmetic still follows a consistent system. Start with four components, work through a small example, and connect the calculation to the letters and paper from 1843.

Worked products

Keep the factors in order

Each row follows the same unit multiplication rules. The coefficients below use the order real, i, j, k.

Original calculations, checked by component arithmetic and complex matrices.
ExpressionExpanded resultFour components
(1 + i)(1 + j)1 + i + j + k(1, 1, 1, 1)
(1 + j)(1 + i)1 + i + j − k(1, 1, 1, −1)
(i + j)²−2(−2, 0, 0, 0)
(i + j)(i − j)−2k(0, 0, 0, −2)

Chronology

A timeline of the turning points

  1. Discovery

    Hamilton dated the breakthrough to a walk along the Royal Canal.

  2. Letter to John T. Graves

    A letter dated the next day explains the mathematical problem and the new multiplication rules.

  3. Academy presentation

    Hamilton’s first paper on quaternions was read at the Royal Irish Academy.

  4. Printed records

    The Graves letter appeared in the Philosophical Magazine; the edited first-paper transcription identifies Proceedings volume 2 (1844), pages 424–434.

Four real components, rather than a new kind of decimal

Write a quaternion as a + bi + cj + dk, where a, b, c and d are real numbers. The symbols i, j and k obey multiplication rules; they are not three adjustable numerical values to substitute into an ordinary real-number formula. Equality requires all four components to match. Addition is straightforward: add the real parts, the i parts, the j parts and the k parts separately.

For example, (1 + i) + (1 + j) = 2 + i + j. Multiplication needs extra information because a product of two of the new units must be defined. Hamilton’s first paper states the unit rules before deriving the general product.

Sources for this section: [1]

Read the multiplication rules in the correct direction

Each imaginary unit squares to −1: i² = j² = k² = −1. In the cyclic direction, ij = k, jk = i and ki = j. Reverse a pair of different units and the sign changes: ji = −k, kj = −i and ik = −j. The real number 1 remains the multiplicative identity.

Thus ij and ji are different even though they use the same two symbols. This is noncommutativity. It does not prevent the distributive law from working: brackets may still be expanded term by term, provided the order within each product is preserved. Hamilton’s letter to Graves explicitly discusses adopting ji = −ij.

Sources for this section: [1] · [2]

Work through the same two factors in opposite orders

Let p = 1 + i and q = 1 + j. Expanding p q gives 1 + j + i + ij, so p q = 1 + i + j + k. Now reverse the factors. The expansion of q p is 1 + i + j + ji, giving q p = 1 + i + j − k. Only the last component changes, but that is enough to make the quaternions unequal.

Subtracting the second answer from the first gives p q − q p = 2k. This makes the failure of commutativity visible in one component. These are original worked calculations for this guide. They were checked both with the component product formula and with an independent representation using two-by-two complex matrices.

Sources for this section: [1] · [2]

A square shows why mixed terms need care

Try (i + j)². Correct expansion gives i² + ij + ji + j² = −1 + k − k −1 = −2. The middle terms cancel. Substituting 2ij for their sum would give −2 + 2k, which is wrong: that familiar abbreviation silently assumes ij = ji.

Order can still be irrelevant for particular pairs. For instance, multiplying any quaternion by a real number works in either order, and every quaternion commutes with itself. Noncommutative means that the order cannot be ignored in general, not that every reversed product must differ.

Sources for this section: [1]

Place the calculation beside the 1843 evidence

The letter to Graves is dated 17 October 1843, one day after the discovery it describes. It shows Hamilton trying to extend earlier work with pairs and triplets, rather than simply announcing an isolated formula. His first quaternion paper was read to the Royal Irish Academy on 13 November. The presentation date and the printed Proceedings year, 1844, describe different stages of communication.

The well-known bridge account comes from later letters. In 1865 Hamilton recalled walking with his wife on 16 October 1843 and cutting the fundamental relation into a stone. Reading the near-contemporary mathematical letter beside that retrospective recollection lets the discovery story and the actual algebra illuminate one another.

Sources for this section: [2] · [3] · [4] · [1]

Try an example before reading the answer

Exercise: set r = 2 + i and s = 1 + j. Calculate r s and s r, keeping ij and ji in their original order during expansion. Then find their difference. Finally calculate (i + j)(i − j).

Answer: r s = 2 + i + 2j + k, while s r = 2 + i + 2j − k. Therefore r s − s r = 2k. For the last expression, i² − ij + ji − j² = −1 − k − k + 1 = −2k. The result differs from a real-number difference-of-squares calculation because the mixed products do not cancel in that order.

Sources for this section: [1]

Continue the chronology

Connected biographies

Read Hamilton’s wider life in mathematics

William Rowan Hamilton in an 1885 autotype reproduction of an 1857 photograph; the complete supplied Library of Congress frame is retained.
IrelandCulture

1805–1865

William Rowan Hamilton

Mathematician, mathematical physicist and astronomerWilliam Rowan Hamilton developed influential mathematical methods for optics and mechanics and introduced quaternions in 1843. Based at Dunsink Observatory, he combined a long academic career in Dublin with research that changed the language of mathematical physics and algebra.Read biography

Quick answers

Common questions

What does noncommutative mean?
A multiplication is noncommutative when reversing the factors can change the result. For quaternions, ij = k but ji = −k.
Can I still expand brackets?
Yes. Distribute each term while preserving the order of factors inside each product.
Was the first quaternion paper published in 1843?
It was read on 13 November 1843. The edited transcription identifies its printed location as Proceedings of the Royal Irish Academy, volume 2 (1844), pages 424–434.

Primary and institutional sources

How this history was checked

Hamilton’s paper supplies the unit and component-product rules. His Graves letter is dated the day after discovery; the bridge narrative is a later recollection. The examples, explanatory sequence and exercise are original editorial work, with two independent arithmetic checks. This article was reviewed on 27 October 2026.

  1. William Rowan Hamilton / Trinity College Dublin transcriptionOn a new Species of Imaginary Quantities connected with a theory of Quaternions: read 13 November 1843, printed in Proceedings 2 (1844), 424–434
  2. William Rowan Hamilton / Trinity College Dublin transcriptionLetter to John T. Graves, 17 October 1843, printed in 1844
  3. William Rowan Hamilton / Trinity College Dublin transcriptionLetters describing the Discovery of Quaternions, including 5 August 1865 letter to Archibald
  4. Trinity College Dublin / David R. WilkinsHamilton’s Research on Quaternions: chronology and bibliography