AUTHORS:
Bases: sage.groups.affine_gps.affine_group.AffineGroup
A Euclidean group.
The Euclidean group \(E(A)\) (or general affine group) of an affine space \(A\) is the group of all invertible affine transformations from the space into itself preserving the Euclidean metric.
If we let \(A_V\) be the affine space of a vector space \(V\) (essentially, forgetting what is the origin) then the Euclidean group \(E(A_V)\) is the group generated by the general linear group \(SO(V)\) together with the translations. Recall that the group of translations acting on \(A_V\) is just \(V\) 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 \((A,b)\) of a matrix and a vector. This pair then represents the transformation
We can also represent this as a linear transformation in \(\dim(V) + 1\) dimensional space as
and lifting \(x = (x_1, \ldots, x_n)\) to \((x_1, \ldots, x_n, 1)\).
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