You need to show that $|\det T|=a_1a_2\cdots a_n$. You can do this by imposing an orthonormal basis on $\mathbb{R}^n$, and taking the determinant of that matrix. The standard basis will do, and $T$ sends it to the diagonal matrix with diagonal entries $a_1, a_2, \ldots, a_n$, which has determinant $a_1a_2\cdots a_n$, as desired.