Let $F$ be a field and $D$ a function on $n\times n$ matrices over $F$. Suppose $D(AB)=D(A)D(B)$ for all $A,B$. Show that either $D(A)=0$ for all $A$, or $D(I)=1$. In the latter case show that $D(A)\neq 0$ whenever $A$ is invertible.
I understand the question after In the latter..., but I'm stuck on just understanding what this is asking. Is this saying that suppose $D(A)\neq 0$ for a specific $A$, then $D(A)=D(AI)=D(A)D(I)=0$. A contradiction since $D(I)\neq 0$?
It's saying that if there is at least one $A$ with $D(A) \ne 0$, then $D(I) = 1$. This comes about as follows:
Note that if $D(A) \ne 0$ for some $A$, then
$D(I)D(A) = D(IA) = D(A), \tag 1$
whence since $D(A) \ne 0$,
$D(I) = 1. \tag 2$
Now if $A$ is invertible, we have
$AA^{-1} = I, \tag 3$
so
$D(A)D(A^{-1}) = D(AA^{-1}) = D(I) = 1, \tag 4$
which forces both
$D(A) \ne 0 \ne D(A^{-1}). \tag 5$
We also have
$D(I)D(I) = D(I^2) = D(I), \tag 6$
so the only two possibilities for $D(I)$ are $0$ and $1$. If $D(I) = 0$, then
$D(A) = D(A) D(I) = 0 \tag 7$
for every $A$.