If $f(AB)=f(A)f(B)$ then $f(A)=g(det(A))$ Let $\mathbb{K}$ a field, $f: M_n(\mathbb{K}) \to \mathbb{K}$ non constant sucht that: $f(AB)=f(A)f(B)$.
Prove that there exist an endomorphism $g$ on the monoid $(\mathbb{K}, \cdot)$ such that $f(A)=g(\mathrm{det}(A))$ for all $A$. Is $g$ unique?
I proved that $f(A)=0$ if and only if $A$ is not invertible. Any ideas how to construct $g$?
 A: Every invertible matrix is a product of elementary matrices corresponding to two types of elementary row operations, namely, (a) row additions and (b) multiplication of the first row. For every nonzero scalar $a$, since
$$
\pmatrix{1&a\\ 0&1}\sim\pmatrix{1&1\\ 0&1}\sim\pmatrix{1&2\\ 0&1}=\pmatrix{1&1\\ 0&1}^2,
$$
it can be shown that $f(A)=1$ when $A$ is an elementary matrix for type (a). It follows that $f(A)=g(\det(A))$ where $g(a)=f\left(\operatorname{diag}(a,1,\ldots,1)\right)$.
A: The homomorphism $f$ induces a homomorphism $f^*$ from $GL(n, \mathbb{R})$ to $\mathbb{R}^*$. The image is an Abelian group, hence the kernel contains the derived subgroup of  $GL(n, \mathbb{R})$ which is the group of all matrices with determinant 1. So if $\det(A)=1$, we have $f(A)=1$. This includes all elementary strictly upper and lower triangular matrices. The other elementary matrices include the matrices corresponding to switching first two rows $S_{1,2}$ with determinant $-1$ and matrices corresponding to multiplication a row 1  by a number $x$, $M(1,x)$. In fact $S_{1,2}$ is a product of $M(1,-1)$ and two elementary matrices with det 1, so we are left with $M(1,x)$.  In that case define $g(x)=f(M(1,x))$.  Since every nonsingular matrices are products of elementary matrices, we are done by adding $g(0)=0$. This $g$ is clearly an endomorphism of the monoid $(K,\cdot)$.
This proof shows that $g(x)=f(M(1,x))$ for every real $x$, so $g$ is unique.
A: We have that $GL_n$ is engendered by the matrix of the form
$$ T_{i,j}(a)=Id +aE_{i,j}$$
$$D_i(a) =Id + (a-1)E_{i,i}$$
Let $A \in GL_n$, then we can transform $A$ into a dilatation matrix using transvection.
Using transvection matrix we reduce $A$ :
$$A = T_{s}...T_r\begin{pmatrix}1 & 0 
\\ 0 & A_1 \end{pmatrix}T_{p}...T_{m} $$
Then applying it on $A_1$ we end up with diagonal matrix $D_n(\det(A))= \operatorname{diag}(1,1,...,\det(A))$ :
$$A=T_{s}...T_qD_n(\det(A))T_p...T_{u} $$
And because for a given tranvesction $T=T_{i,j}(a)$:
$$f(T)=1=det(T)$$
It follows that :
$$f(A)=f(D_n(det(A))$$
Defining :
$$g : x \in \mathbb{K} \to f(D_n(x))$$
$$f(A)=g(det(A))$$
