Problem:
Let $F_q$ be a finite field with $q$ elements.
$T_n(F_q) := \{ A = (a_{ij}) \in F^{n \times n}$ | $a_{ij} = 0$ for $i < j,$ and $a_{ii} \neq 0$ $\forall i \}$.
Determine the number of elements in $T_n(F_q)$.
My solution is as follows:
Starting with the last row going upwards, there are:
$q-1$ possibilities for the last row;
$(q-1)q$ possibilities for the row before the last;
.
.
.
$(q-1)q^{n-1}$ possibilities for the first row.
Therefore, in total there are $(q-1)^nq^{\sum_{i=1}^{n-1} i} = (q-1)^nq^{\frac{n(n-1)}{2}}$ elements.
Could you, please, check my solution?
Yes, your solution is right. An easier way would be to simply count the possible diagonal entries, of which there are $(q-1)^n$ (since there are $n$ entries each with $q-1$ choices), and just multiply this by all possible choices of the entries below the diagonal ($q$ choices for each entry, and there are $n(n-1)/2$ entries). There's not really a need to count these by rows.