Solution
= Solution
In the <matrix product>, $(AB)_{ij}=\sum_{k=1}^n a_{ik}b_{kj}$. A nonzero summand in a product of <upper triangular matrices> requires both $i\le k$ and $k\le j$. If $i>j$, no such index exists, so the product is upper triangular. If $i=j$, only $k=i$ survives, giving
$$
\boxed{(AB)_{ii}=a_{ii}b_{ii}.}
$$
This also shows inductively why the diagonal of an integer <matrix power> consists of the corresponding powers of the diagonal entries.