# Substitution (algebra)

In algebra, the operation of **substitution** can be applied in various contexts involving formal objects containing symbols (often called variables or indeterminates); the operation consists of systematically replacing occurrences of some symbol by a given value.

Substitution is a basic operation of computer algebra.[1][2] It is generally called "subs" or "subst" in computer algebra systems.

A common case of substitution involves polynomials, where substitution of a numerical value for the indeterminate of a (univariate) polynomial amounts to evaluating the polynomial at that value. Indeed, this operation occurs so frequently that the notation for polynomials is often adapted to it; instead of designating a polynomial by a name like *P*, as one would do for other mathematical objects, one could define

so that substitution for *X* can be designated by replacement inside "*P*(*X*)", say

or

- .

Substitution can however also be applied to other kinds of formal objects built from symbols, for instance elements of free groups. In order for substitution to be defined, one needs an algebraic structure with an appropriate universal property, that asserts the existence of unique homomorphisms that send indeterminates to specific values; the substitution then amounts to finding the image under such a homomorphism.

Substitution is related to, but not identical to, function composition; it is also closely related to *β*-reduction in lambda calculus. In contrast to these notions, however, the accent in algebra is on the preservation of algebraic structure by the substitution operation, the fact that substitution gives a homomorphism for the structure at hand (in the case of polynomials, the ring structure).

## See also

- Substitution (logic) — about a formal treatment of substitution
- Trigonometric substitution

## References

- Margret H. Hoft; Hartmut F.W. Hoft (6 November 2002).
*Computing with Mathematica*. Elsevier. ISBN 978-0-08-048855-4. - Andre HECK (6 December 2012).
*Introduction to Maple*. Springer Science & Business Media. ISBN 978-1-4684-0484-5.