Minimum polynomial of an algebraic number: pmin

### 6.11.2 Minimum polynomial of an algebraic number: pmin

The minimal polynomial of an algebraic number is the monic polynomial of smallest degree with integer coefficents which has the algebraic number as a root.

The pmin command finds the minimum polynomial of an algebraic number.

- pmin takes one mandatory argument and one optional argument:
  - α, an algebraic number.
  - Optionally, x, a variable name to use as the variable in the polynomial.
- pmin(α) returns the minimal polynomial for α, where the polynomial is given as a list of the coefficients (see Section 6.27.1).
  pmin(α,x) returns the minimal polynomial for α as a symbolic expression with the variable x.

Examples.

- Input:
  pmin(sqrt(2) + sqrt(3))
  Output:

  ▯ 1,0,−10,0,1▯

- Input:
  pmin(sqrt(2) + sqrt(3),x)
  Output:

  x4−10 x2+1

  Note that (√2 + √3)2 = 5 + 2√6 and so ((√2 + √3)2 − 5)2 = 24, which can be rewritten as (√2 + √3)4 − 10 (√2 + √3)2 + 1 = 0.
- Input:
  pmin(sqrt(2) + i*sqrt(3))
  Output:

  ▯ 1,0,2,0,25▯

- Input:
  pmin(sqrt(2) + i*sqrt(3),z)
  Output:

  z4+2 z2+25

- Input:
  pmin(sqrt(2) + 2*i)
  Output:

  ▯ 1,0,4,0,36 ▯

- Input:
  pmin(sqrt(2) + 2*i,z)
  Output:

  z4+4 z2+36