In mathematics, a canonical basis is a basis of an algebraic structure that is canonical in a sense that depends on the precise context: