# 38.3 Parent Algebras and Subalgebras

GAP distinguishs between parent algebras and subalgebras of parent More about Groups and Subgroups), so here it is only sketched.

Each subalgebra belongs to a unique parent algebra, the so-called parent of the subalgebra. A parent algebra is its own parent.

Parent algebras are constructed by `Algebra` and `UnitalAlgebra`, subalgebras are constructed by `Subalgebra` and `UnitalSubalgebra`. The parent of the first argument of `Subalgebra` will be the parent of the constructed subalgebra.

Those algebra functions that take more than one algebra as argument require that the arguments have a common parent. Take for instance `Centralizer`. It takes two arguments, an algebra A and an algebra B, where either A is a parent algebra, and B is a subalgebra of this parent algebra, or A and B are subalgebras of a common parent algebra P, and returns the centralizer of B in A. This is represented as a subalgebra of the common parent of A and B. Note that a subalgebra of a parent algebra need not be a proper subalgebra.

An exception to this rule is again the set theoretic function `Intersection` (see Intersection), which allows to intersect algebras with different parents.

Whenever you have two subalgebras which have different parent algebras but have a common superalgebra A you can use `AsSubalgebra` or `AsUnitalSubalgebra` (see AsSubalgebra, AsUnitalSubalgebra) in order to construct new subalgebras which have a common parent algebra A.

The following sections describe the functions related to this concept (see Algebra, UnitalAlgebra, IsAlgebra, IsUnitalAlgebra, AsAlgebra, AsUnitalAlgebra, Subalgebra, UnitalSubalgebra, AsSubalgebra, AsUnitalSubalgebra, and also IsParent, Parent).

GAP 3.4.4
April 1997