AUTHORS:
Bases: sage.groups.affine_gps.affine_group.AffineGroup
A Euclidean group.
The Euclidean group (or general affine group) of an affine
space
is the group of all invertible affine transformations from
the space into itself preserving the Euclidean metric.
If we let be the affine space of a vector space
(essentially, forgetting what is the origin) then the Euclidean group
is the group generated by the general linear group
together with the translations. Recall that the group of translations
acting on
is just
itself. The general linear and translation
subgroups do not quite commute, and in fact generate the semidirect
product
As such, the group elements can be represented by pairs of a
matrix and a vector. This pair then represents the transformation
We can also represent this as a linear transformation in
dimensional space as
and lifting to
.
See also
INPUT:
Something that defines an affine space. For example
EXAMPLES:
sage: E3 = EuclideanGroup(3, QQ); E3
Euclidean Group of degree 3 over Rational Field
sage: E3(matrix(QQ,[(6/7, -2/7, 3/7), (-2/7, 3/7, 6/7), (3/7, 6/7, -2/7)]), vector(QQ,[10,11,12]))
[ 6/7 -2/7 3/7] [10]
x |-> [-2/7 3/7 6/7] x + [11]
[ 3/7 6/7 -2/7] [12]
sage: E3([[6/7, -2/7, 3/7], [-2/7, 3/7, 6/7], [3/7, 6/7, -2/7]], [10,11,12])
[ 6/7 -2/7 3/7] [10]
x |-> [-2/7 3/7 6/7] x + [11]
[ 3/7 6/7 -2/7] [12]
sage: E3([6/7, -2/7, 3/7, -2/7, 3/7, 6/7, 3/7, 6/7, -2/7], [10,11,12])
[ 6/7 -2/7 3/7] [10]
x |-> [-2/7 3/7 6/7] x + [11]
[ 3/7 6/7 -2/7] [12]
Instead of specifying the complete matrix/vector information, you can also create special group elements:
sage: E3.linear([6/7, -2/7, 3/7, -2/7, 3/7, 6/7, 3/7, 6/7, -2/7])
[ 6/7 -2/7 3/7] [0]
x |-> [-2/7 3/7 6/7] x + [0]
[ 3/7 6/7 -2/7] [0]
sage: E3.reflection([4,5,6])
[ 45/77 -40/77 -48/77] [0]
x |-> [-40/77 27/77 -60/77] x + [0]
[-48/77 -60/77 5/77] [0]
sage: E3.translation([1,2,3])
[1 0 0] [1]
x |-> [0 1 0] x + [2]
[0 0 1] [3]
Some additional ways to create Euclidean groups:
sage: A = AffineSpace(2, GF(4,'a')); A
Affine Space of dimension 2 over Finite Field in a of size 2^2
sage: G = EuclideanGroup(A); G
Euclidean Group of degree 2 over Finite Field in a of size 2^2
sage: G is EuclideanGroup(2,4) # shorthand
True
sage: V = ZZ^3; V
Ambient free module of rank 3 over the principal ideal domain Integer Ring
sage: EuclideanGroup(V)
Euclidean Group of degree 3 over Integer Ring
sage: EuclideanGroup(2, QQ)
Euclidean Group of degree 2 over Rational Field
TESTS:
sage: E6 = EuclideanGroup(6, QQ)
sage: E6 is E6
True
sage: V = QQ^6
sage: E6 is EuclideanGroup(V)
True
sage: G = EuclideanGroup(2, GF(5)); G
Euclidean Group of degree 2 over Finite Field of size 5
sage: TestSuite(G).run()
REFERENCES:
Return a random element of this group.
EXAMPLES:
sage: G = EuclideanGroup(4, GF(3))
sage: G.random_element() # random
[2 1 2 1] [1]
[1 2 2 1] [0]
x |-> [2 2 2 2] x + [1]
[1 1 2 2] [2]
sage: G.random_element() in G
True
TESTS:
sage: G.random_element().A().is_unitary()
True