Lagmental Vicfred

What is one third in a field with seven elements? by Vicfred

In the finite field \(\mathbb{F}_7\), one third is \(5\). That sounds odd until we ask what a multiplicative inverse actually does. We want a number \(x\) such that \(3x = 1\) in the field. Since we do arithmetic modulo \(7\), this amounts to solving

$$ 3x \equiv 1 \pmod{7}. $$

Try \(x = 5\). We get \(3 \cdot 5 = 15 = 2 \cdot 7 + 1\). The remainder is exactly \(1\), so \(3^{-1} = 5\) in \(\mathbb{F}_7\).

Let the computer try all six candidates

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#include <cstdint>
#include <iostream>

using namespace std;

int main() {
  constexpr int64_t p = 7;

  for (int64_t x = 1; x < p; ++x) {
    if ((3 * x) % p == 1) {
      cout << x << endl;
      break;
    }
  }
}

The programme prints 5. Now change p to 6 and run it again. This time it prints nothing. Modulo \(6\), the multiples of \(3\) alternate between \(3\) and \(0\), so they never reach \(1\). That is one reason we call \(\mathbb{F}_7\) a field: every non-zero element has a multiplicative inverse. The integers modulo \(6\) fail that test.

This article was posted on Mon 30 November 2026. Facts and circumstances may have changed since publication.
Please contact me before jumping to conclusions if something seems wrong or unclear.