Gaussian Integer Factorization Calculator

Complex Plane Visualization
Re Im

Understanding Gaussian Integer Factorization

What are Gaussian Integers?

Gaussian integers are complex numbers of the form \(a + bi\), where \(a\) and \(b\) are integers and \(i\) is the imaginary unit (\(i^2 = -1\)). They form a subset of the complex numbers and have unique factorization properties.

The Concept of Gaussian Integer Factorization

Gaussian integer factorization is the process of breaking down a Gaussian integer into the product of Gaussian primes. A Gaussian prime is a Gaussian integer that cannot be factored further into non-unit Gaussian integers.

The Formula

For a Gaussian integer \(z = a + bi\):

\[ z = p_1 \times p_2 \times ... \times p_n \]

Where \(p_1, p_2, ..., p_n\) are Gaussian primes.

The Process

  1. Calculate the norm: \(N(a + bi) = a^2 + b^2\)
  2. Factor the norm into its prime factors
  3. For each prime factor \(p\):
    • If \(p \equiv 3 \pmod{4}\), it's already a Gaussian prime
    • If \(p \equiv 1 \pmod{4}\), find \(c\) and \(d\) such that \(c^2 + d^2 = p\)
  4. Combine the factors to get the Gaussian integer factorization

Example

Let's factor the Gaussian integer \(z = 5 + 2i\):

  1. \(N(5 + 2i) = 5^2 + 2^2 = 29\)
  2. 29 is prime
  3. 29 ≡ 1 (mod 4), so we need to find \(c\) and \(d\) such that \(c^2 + d^2 = 29\)
  4. We find that \(5^2 + 2^2 = 29\)
  5. Therefore, \(5 + 2i\) is already a Gaussian prime

Visual Representation

Re Im -10 -5 5 10 10i 5i -5i -10i 5 + 2i Norm = 29

This diagram shows the Gaussian integer 5 + 2i in the complex plane.