---
tag: VZHN6GA3TA
kind: concept
name: Medial magma
msc: [20N02, 20N05]
specializes: [9689SFPVE9]
sources:
  - url: https://en.wikipedia.org/wiki/Medial_magma
same_as:
  wikidata: Q6806018
  wikipedia: Medial magma
---

## Summary

A medial magma is a [[magma|9689SFPVE9]] that satisfies the medial law $(x y)(u v) = (x u)(y v)$: the two middle elements of a product of four may be swapped.
Every commutative semigroup is medial, and so is every operation of the form $x \cdot y = \varphi(x) + \psi(y) + c$ on an abelian group with commuting endomorphisms $\varphi, \psi$.
For quasigroups, the [[Toyoda–Bruck theorem|W0KBNZBCRR]] says that these affine operations are the only medial ones.
Mediality is the binary case of the [[entropic property|9T2XVJNBBY]] of general algebras.

## Explanations

### L1 human

Write four elements in a square: $x$ and $y$ in the top row, $u$ and $v$ in the bottom row.
You can combine each row and then combine the two results, or combine each column and then combine the results.
A magma is medial when both ways give the same answer.
For example, the average $x \circ y = (x + y)/2$ on the rationals is medial: both ways give the average of all four numbers.
