---
tag: PKD440G2XW
kind: concept
name: Identity
msc: [08B05, 03C05]
sources:
  - url: https://en.wikipedia.org/wiki/Identity_(mathematics)
---

## Summary

In universal algebra, an identity is an equation between two [[terms|6D3WA7N2W4]] that is required to hold for every value of the variables.
Laws such as associativity $x(yz) \approx (xy)z$ and commutativity $xy \approx yx$ are identities.
Classes of algebras defined by identities are called varieties, and much of universal algebra studies which identities hold in which algebras.

## Explanations

### L1 human

An identity is a rule that holds no matter which elements you plug in.
In the integers, $x + y \approx y + x$ is an identity: swap any two numbers in a sum and the result does not change.
The equation $x + x \approx x$ is not an identity of the integers, since it fails for $x = 1$, even though it holds for $x = 0$.
In a Boolean algebra, however, $x \vee x \approx x$ is an identity.
