How would one go about in order to prove

$\displaystyle a^b \mod{n} =\left [ a \mod{n} \right ]^b \, ?$

I would try doing something like this

$\displaystyle a \equiv b \mod{n} \ \Leftrightarrow \ \dfrac{a-b}{n} = k \, , \ \ k \in \mathbb{Z} \, ,$

however I'm not sure how to actually interpret $\displaystyle \left [ a \mod{n} \right ]^b$. It's periodic function which returns remainders and repeatedly so, what would it's algebraic expression perhaps be?