Q:

Proof involving upper or lower triangular matrices

Prove that if $A$ and $B$ are both upper or lower triangular matrices, then the diagonal entries of both $AB$ and $BA$ are the products of the diagonal entries. 
Attempt.  Assuming the dimensions of matrices A and B allow their product to be successfully computed.  I don't know how to go about this proof after this step.  
Hint.  I want the solution to this problem to be a simple as possible, while using techniques that are elementary by nature.  So please, no definition of Matrix Multiplication or Summations.  Thanks! 

A:

Hint.  Try to use the multiplication formula for matrices (if they are of appropriate sizes) $$(AB)_{ij} = \sum_{k = 1}^n A_{ik}B_{kj}$$ and consider the case where $j = i$ to get the diagonal entries.