To prove this statement, we will use Schur's lemma as follows. Let \(V\) be the space of all \(n \times n\) matrices and let \(G\) be the group of all invertible \(n \times n\) matrices under matrix multiplication. Then \(V\) is a representation of \(G\), and the action of \(G\) on \(V\) is given by

\[g \times A = g A g^{-1}\]

for all \(g\) in \(G\) and \(A\) in \(V\).

Now, consider the linear transformation \(T: V \rightarrow V\) defined by

\[T(A) = AB\]

for all \(A\) in \(V\). We will show that \(T\) is a conjugacy between the representation \(V\) and itself, so by Schur's lemma, \(T\) must be unitarily equivalent to the identity transformation.

To show that \(T\) is a conjugacy, we need to verify that

\(T(g \times A) = g \times T(A)\)

for all \(g\) in \(G\) and \(A\) in \(V\). Substituting the definitions of \(g \times A\) and \(T(A)\), we get

\[T(g A g^{-1}) = g AB g^{-1}\]

which is true because matrix multiplication is associative. Therefore, \(T\) is a conjugacy between the representation \(V\) and itself, and by Schur's lemma, \(T\) must be unitarily equivalent to the identity transformation.

This means that there exists a unitary matrix \(U\) such that

\[AB = U AU^{-1}\]

for all \(A\) in \(V\). Taking the trace of both sides of this equation, we get

\[tr(AB) = tr(U AU^{-1})\]

Since the trace is invariant under unitary transformations, it follows that

\[tr(AB) = tr(AU^{-1}U) = tr(A)\]

for all \(A\) in \(V\). In particular, this equation holds for \(A = I\), the identity matrix. Therefore,

\[tr(B) = tr(I) = n\]

for all invertible \(B\).

Now, consider the linear transformation \(S: V \leftarrow V\) defined by

\[S(A) = AB - BA\]

for all \(A\) in \(V\). Then

\[tr(S(A)) = tr(AB - BA) \]

\[= tr(AB) - tr(BA) \]

\[= n - n = 0\]

for all \(A\) in \(V\). Therefore, \(S\) is the zero transformation, which means that

\[AB = BA\]

for all \(A\) in \(V\). In particular, this equation holds for \(A = B^{-1}\), so

\[BB^{-1} = B^{-1}B\]

which implies that \(B^{-1}B = I\). Therefore, \(B\) is unitary, which means that

\[AB = B A\]

for all unitary \(B\).

Finally, consider the linear transformation \(T': V \rightarrow V\) defined by

\[T'(A) = AB - A\]

for all \(A\) in \(V\). Then

\[T'(AB - A) \]

\[= (AB - A)B - (AB - A) \]

\[= -AB + AB = 0\]

for all unitary \(B\), so \(T'\) is the zero transformation. This means that

\[AB = A\]

for all unitary \(B\), which implies that \(A\) is a scalar multiple of the identity matrix. Therefore,

\[A = c I\]

for some scalar \(c\). This completes the proof.