Having the equation $a^n=b^n$ hold for a single integer $n$ does not imply $a=b$. However, if it holds for two integers $n,m$ such that $\gcd(n,m)=1$, then it does follow that $a=b$.
Proof: By Bezout's lemma, there exists integers $x,y$ for which $mx+ny=1$. Then
$$
a =a^{mx+ny}=(a^m)^x\cdot(a^n)^y=(b^m)^x\cdot(b^n)^y=b^{mx+ny}=b
$$
0
Bumbble Comm
On
Consider the Quaternions, then $i^2=j^2=-1$ but they are distinct elements
Having the equation $a^n=b^n$ hold for a single integer $n$ does not imply $a=b$. However, if it holds for two integers $n,m$ such that $\gcd(n,m)=1$, then it does follow that $a=b$.
Proof: By Bezout's lemma, there exists integers $x,y$ for which $mx+ny=1$. Then $$ a =a^{mx+ny}=(a^m)^x\cdot(a^n)^y=(b^m)^x\cdot(b^n)^y=b^{mx+ny}=b $$