Solution (source code)

= Solution

The <identity matrix> has entries given by the <Kronecker delta>, so
$$
\boxed{\operatorname{tr}I=\delta_{ii}=n.}
$$
Each of the $n$ diagonal entries is one.