An algebra (or more generally a magma) is said to be power-associative if the subalgebra generated by any element is associative.
Concretely, this means that if an element *x* is multiplied by itself several times, it doesn't matter in which order the multiplications are carried out, so for instance *x*(*x*(*x**x*)) = (*x*(*x**x*))*x* = (*x**x*)(*x**x*).
This is stronger than merely saying that (*x**x*)*x* = *x*(*x**x*) for every *x* in the algebra.

Every associative algebra is obviously power-associative, but so too are alternative algebras like the octonions and even some non-alternative algebras like the sedenions.

Exponentiation to the power of any natural number other than zero can be defined consistently whenever multiplication is power-associative.
For example, there is no ambiguity as to whether *x*^{3} should be defined as (*x**x*)*x* or as *x*(*x**x*), since these are equal.
Exponentiation to the power of zero can also be defined if the operation has an identity element, so the existence of identity elements becomes especially useful in power-associative contexts.

A nice substitution law holds for real power-associative algebras with unit, which basically asserts that multiplication of polynomials works as expected. For *f* a real polynomial in *x*, and for any *a* in such an algebra define *f*(*a*) to be the element of the algebra resulting from the obvious substitution of *a* into *f*. Then for any two such polynomials *f* and *g*, we have that (*fg*) (*a*) = *f*(*a*)*g*(*a*).