If $A$ and $B$ commute, then prove that so also do $A^m$ and $B^n$ for all positive integers $m$ and $n$.
My Proof
So we want to show that, for all positive integers $m$ and $n$, $A^mB^n = B^nA^m$.
Let $P(n,m) = A^mB^n$, and let $A$ and $B$ be $p \times p$ matrices.
$n,m = 1$: $P(1, 1) = AB = BA$ Since we assumed that $A$ and $B$ commute.
We first perform induction over $n$.
$n = k, m = 1$: $P(k, 1) = AB^k = B^kA$ This is the induction hypothesis.
$n = k + 1, m = 1$: $P(k + 1, 1) = (AB^k)(B)$ By the induction hypothesis.
$= A(B^kB)$ Since matrix multiplication is associative.
$= AB^{k + 1}$
Q.E.D.
We lastly perform induction over $m$.
$n = 1, m = k$: $P(1, k) = A^k B = BA^k$ This is the induction hypothesis.
$n = 1, m = k + 1$: $P(1, k + 1) = (A)(A^k B)$ By the induction hypothesis.
$= (AA^k)(B)$ Since matrix multiplication is associative.
$= A^{k + 1}B$
Q.E.D.
I would greatly appreciate it if people could please take the time to review my proof for correctness.
Since both of the answers posted so far have been down-voted, I'm going to assume that they're both incorrect and instead post my new proof.
My New Proof
Let $A$ and $B$ be $n \times n$ matrices.
For every positive integer $m$, $A^m$ and $B$ commute.
Let $P(m) = A^nB = BA^m$.
$m = 1$: $P(1) = AB = BA$ Since we assumed that $A$ and $B$ commute.
$P(m) = A^mB = BA^m$ This is the induction hypothesis.
$P(m + 1) = (A)(A^mB)$ Since $(A)(A^mB) = (AA^m)B = A^{m + 1}B$.
$= (A)(BA^m)$ By the induction hypothesis.
$= B(AA^m)$ Since we assumed that $A$ and $B$ are commutative.
$= BA^{m + 1}$ Q.E.D.
For every fixed $m$ and variable $n$, $B^nA^m = A^mB^n$.
$P(1) = BA^m = A^mB$
$P(n) = B^nA^m = A^mB^n$ This is the inductive hypothesis.
$P(n + 1) = (B)(B^nA^m)$ Since $(B)(B^nA^m) = (BB^n)A^m = B^{n + 1}A^m$, since matrix multiplication is associative.
$= (B)(A^mB^n)$ By the inductive hypothesis.
$= A^m(BB^n)$ Since we proved in the last inductive proof that $A^m$ and $B$ commute for all $m$.
$= A^mB^{n + 1}$ Q.E.D.
I would greatly appreciate feedback as to whether my new proof is correct.