In mathematics, an identity is an equality relating one mathematical expression A to another mathematical expression B, such that A and B (which might contain some variables) produce the same value for all values of the variables within a certain domain of discourse. In other words, A = B is an identity if A and B define the same functions, and an identity is an equality between functions that are differently defined. For example, ( a + b ) 2 = a 2 + 2 a b + b 2 {\displaystyle (a+b)^{2}=a^{2}+2ab+b^{2}} and cos 2 θ + sin 2 θ = 1 {\displaystyle \cos ^{2}\theta +\sin ^{2}\theta =1} are identities. Identities are sometimes indicated by the triple bar symbol ≡ instead of =, the equals sign. Formally, an identity is a universally quantified equality.