Shuffle a deck of cards as many times as you like. The order changes completely, but there are still 52 cards, 13 hearts and 4 aces. Those counts are invariants of shuffling. Tear a card in half and the count changes: tearing is a different transformation, with different invariants. The habit to build is to name the move first, then ask what it cannot change.
Expressions work the same way. Multiply P(x)=x3−2x+1 by 5 to get 5x3−10x+5. Every coefficient changed, but the degree is still 3 and the roots are the same, because 5P(x)=0 exactly when P(x)=0. Shift the graph of y=x2 three units right to get y=(x−3)2: the vertex moves from (0,0) to (3,0), but the shape and the minimum value 0 stay fixed.
Invariance is not the same as equivalence. x2+2x+1 and (x+1)2 are equivalent: they agree for every x, so they are one function written two ways. Invariance is about a feature that survives a change that may produce a genuinely different object: 5P(x) is not equal to P(x), yet the two share a degree and roots. Ask whether the whole expression stayed the same or only one feature of it.
Invariants also settle impossibility puzzles. Write 1 to 10 on a board, then repeatedly erase two numbers and write their difference. The total keeps changing, but its parity does not: replacing a and b by a−b lowers the total by 2b, an even number. The total starts at 55, which is odd, so the last number left must be odd.
Think of it like this. An invariant is like a fingerprint. Change your clothes, your haircut and your address, and the print still identifies you. A burn would change it, just as differentiating a polynomial changes its degree while scaling does not, so an invariant only makes sense once you say which changes are allowed.
Core idea. An algebraic invariant is a quantity that stays the same after an allowed transformation.