maths.freeAbstract Algebra › 17. Polynomials › Sage

Sage

Sage is particularly adept at building, analyzing and manipulating polynomial rings. We have seen some of this in the previous chapter.

Sage

Sage is particularly adept at building, analyzing and manipulating polynomial rings. We have seen some of this in the previous chapter. Let's begin by creating three polynomial rings and checking some of their basic properties. There are several ways to construct polynomial rings, but the syntax used here is the most straightforward.

Polynomial Rings and their Elements

Basic properties of rings are availble for these examples.

With the construction syntax used above, the variables can be used to create elements of the polynomial ring without explicit coercion (though we need to be careful about constant polynomials).

Polynomials can be evaluated like they are functions, so we can mimic the evaluation homomorphism.

Notice that p is a degree two polynomial, yet through a brute-force examination we see that the polynomial only has one root, contrary to our usual expectations. It can be even more unusual.

Sage can create and manipulate rings of polynomials in more than one variable, though we will not have much occasion to use this functionality in this course.

Irreducible Polynomials

Whether or not a polynomial factors, taking into consideration the ring used for its coefficients, is an important topic in this chapter and many of the following chapters. Sage can factor, and determine irreducibility, over the integers, the rationals, and finite fields.

First, over the rationals.

Factoring over the integers is really no different than factoring over the rationals. This is the content of finding a factorization over the integers can be converted to finding a factorization over the rationals. So it is with Sage, there is little difference between working over the rationals and the integers. It is a little different working over a finite field. Commentary follows.

To check these factorizations, we need to compute in the finite field, F, and so we need to know how the symbol a behaves. This symbol is considered as a root of a degree two polynomial over the integers mod 5, which we can get with the .modulus() method.

So \(a^2+4a+2=0\), or \(a^2=-4a-3=a+2\). So when checking the factorizations, anytime you see an \(a^2\) you can replace it by \(a+2\). Notice that by we could find the one linear factor of r, and the four linear factors of s, through a brute-force search for roots. This is feasible because the field is finite.

However, q factors into a pair of degree 2 polynomials, so no amount of testing for roots will discover a factor.

With Eisenstein's Criterion, we can create irreducible polynomials, such as in .

Over the field \({\mathbb Z}_p\), the field of integers mod a prime \(p\), Conway polynomials are canonical choices of a polynomial of degree \(n\) that is irreducible over \({\mathbb Z}_p\). See the exercises for more about these polynomials.

Polynomials over Fields

If \(F\) is a field, then every ideal of \(F[x]\) is principal (). Nothing stops you from giving Sage two (or more) generators to construct an ideal, but Sage will determine the element to use in a description of the ideal as a principal ideal.

is the key fact that allows us to easily construct finite fields. Here is a construction of a finite field of order \(7^5=16\,807\). All we need is a polynomial of degree \(5\) that is irreducible over \({\mathbb Z}_7\).

The symbol xbar is a generator of the field, but right now it is not accessible. xbar is the coset \(x + \langle x^5+ x + 4\rangle\). A better construction would include specifying this generator.

Symbols used here

\mathbb{N},\ \mathbb{Z},\ \mathbb{Q},\ \mathbb{R},\ \mathbb{C}
number sets
Naturals, integers, rationals, reals, complex numbers.
x \in A,\ A \subseteq B
element of, subset
x belongs to A; every element of A is in B.
\blacksquare\ \text{or}\ \square
end of proof (halmos)
Marks the point where the statement has been established.
a \equiv b \pmod n
congruent modulo n
n divides a − b; a and b have the same remainder.
a \mid b,\ \gcd(a,b)
divides, greatest common divisor
b is a multiple of a; the largest number dividing both.
(G, \cdot),\ e,\ g^{-1}
group, identity, inverse
A set with an operation; the do-nothing element; the element that undoes g.
G \cong H,\ G / N
isomorphic, quotient group
Same structure; the group of cosets of a normal subgroup N.
\mathbb{Z}/n\mathbb{Z},\ \mathbb{Z}_n
integers modulo n
The remainders 0…n−1 with clock arithmetic.
\operatorname{Hom}(A, B),\ f \circ g
arrows from A to B, composition
The set of morphisms; do g then f.

Questions people ask

What is a group, in plain words?

A set with one operation that is associative, has an identity, and lets every element be undone. Symmetries of any object form a group — that is where the idea came from.

What is the difference between a ring and a field?

A ring has addition and multiplication that behave like the integers (you cannot always divide); a field is a ring where every non-zero element has a reciprocal, like the rationals or the reals.

Probeer jou eie

Parts of this page are adapted from Judson, Abstract Algebra: Theory and Applications (GFDL 1.3). Condensed and re-explained here; errors are ours.

Meer in Abstract Algebra