This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

AlgebraicNumber

AlgebraicNumber
represents the algebraic number in the field given by .
  • AlgebraicNumber objects in the same field are automatically combined by arithmetic operations.
  • The generator can be any algebraic number, represented in terms of radicals or Root objects. The coefficients must be integers or rational numbers.
  • AlgebraicNumber is automatically reduced so that is an algebraic integer, and the list of is of length equal to the degree of the minimal polynomial of .
  • A particular algebraic number can have many different representations as an AlgebraicNumber object. Each representation is characterized by the generator specified for the field.
  • AlgebraicNumber objects representing integers or rational numbers are automatically reduced to explicit integer or rational form.
Represent an algebraic number:
Do arithmetic:
Get a numerical approximation:
Represent an algebraic number:
In[1]:=
Click for copyable input
Out[1]=
Do arithmetic:
In[2]:=
Click for copyable input
Out[2]=
Get a numerical approximation:
In[3]:=
Click for copyable input
Out[3]=
AlgebraicNumber objects can be evaluated to any precision:
Objects representing integers or rational numbers are automatically simplified:
The generator in AlgebraicNumber will automatically reduce to an algebraic integer:
Radical expressions:
Root objects:
Coefficients of AlgebraicNumber objects are integers or rational numbers:
The number of coefficients is adjusted to match the degree of the algebraic number:
Arithmetic in a number field:
Operations on AlgebraicNumber objects:
Computations with AlgebraicNumber objects in the same number field are fast:
Make them part of the same number field:
In this example RootReduce automatically uses AlgebraicNumber object computations:
Compare to direct computations with Root objects:
Two solutions of the Pell equation :
More solutions can be deduced easily:
Check:
Use RootReduce to transform an algebraic number to a Root object:
Use ToNumberField to get representations of Root objects as AlgebraicNumber objects:
Get the generator polynomial:
Algebraic number theory operations:
Minimal polynomial:
Operations such as Sqrt, Re, and Im do not automatically reduce:
Convert to AlgebraicNumber using RootReduce:
New in 6