Is equality the same as identity?

An equality is not the same as identity. There are equalities of two different types: equations and identities. Identities and equation are equalities with two sides, where the equal sign separates the mathematical expressions of the LHS and RHS.

  1. In algebra or trigonometry an identity is an equality which is satisfied for all values of the involved variables. Examples: $$(a+b)^{2}=a^{2}+2ab+b^{2},$$ $$\sin 2a=2\sin a\cos a.$$
  2. An equation is an equality which express a relationship between given quantities, the knowns, and quantities yet to be determined, the unknowns. Examples: $$ax^{2}+bx+c=0\Leftrightarrow x=\frac{-b\pm \sqrt{b^{2}-4ac}}{2a},$$ $$\cos x+\sin x=1\Leftrightarrow x=\frac{\pi }{2}+2k\pi ,x=2k\pi. $$

While the equations such as above may have solutions, identities are either true or false. If true, which remains the same is the truth of the equality whatever the values of the variables are.

To denote an identity, as commented by Ronald, sometimes is used the $\equiv$ sign instead of the $=$ as in $$(a+b)^{2}\equiv a^{2}+2ab+b^{2}.$$


An identity is a relation that means that whatever the number or value may be, the answer stays the same.

Not quite. there is no "answer" in an identity; it's not a problem to solve. And you had better not change the constant numbers in an identity, then it wouldn't work! An identity is just an equation that is true (we also say the equation "holds" or is "satisfied") no matter what numbers we use for the variables. So for example, $$(x+y)^2 = x^2 + 2xy + y^2$$ is true no matter what numbers you plug in for $x$ and $y$ (try it!).

'Equality' is just when two things are equal, like $y = 3y - 6$, which is true when $y=3$. The word is not used too often, but you might see it in a big long statement in a proof or something like $$\text{blablabla} = \text{blebleble} = \text{blahblahblah} = \text{blehblehbleh},$$ and if the step from 'blebleble' to 'blahblahblah' is especially confusing, the writer might say, "the second equality is a consequence of Theorem 3.4" to explain where that step came from. And no, $\text{blebleble} = \text{blahblahblah}$ is not necessarily an identity just because someone refers to it as an equality; it probably only holds in the given context.

You might also see the word equality in a statement like, "for all real $x$, we have $x^2 \geq 0$, with equality when $x=0$."