In Griffiths' intro to Quantum Mechanics 2nd edition, in the appendix A.3 which is a review on linear algebra and matrixes (on page 441), he states that a linear transformation on a set of basis vectors can be expressed as follows:
$$ \begin{align*} \hat{T}|e_1\rangle &= T_{11}|e_1\rangle + T_{21}|e_2\rangle+...+T_{n1}|e_n\rangle\\ \hat{T}|e_2\rangle &= T_{12}|e_1\rangle + T_{22}|e_2\rangle+...+T_{n2}|e_n\rangle\\ &...\\ \hat{T}|e_n\rangle &= T_{1n}|e_1\rangle + T_{2n}|e_2\rangle+...+T_{nn}|e_n\rangle\\ \end{align*} $$ Where $\hat{T}$ is a linear transformation and $|e_i\rangle$ is the $i$th basis vector in the basis set.
Where exactly is Griffith getting this? I have never seen this in any previous linear algebra text where a transform on a basis is expressed in terms of the other basis vectors. The ONLY way I see this working is if the basis set is the standard basis set:
$$ \begin{align*} |e_1\rangle=\left[\begin{array}{c} 1\\0\\\vdots\\0 \end{array}\right],&& |e_2\rangle=\left[\begin{array}{c} 0\\1\\\vdots\\0 \end{array}\right],&& ...,&& |e_n\rangle=\left[\begin{array}{c} 0\\0\\\vdots\\1 \end{array}\right] \end{align*} $$
However in Griffiths, he doesn't make this distinction. He doesn't even qualify if the basis is orthonormal. I have tried to derive it myself without using the standard basis in $\mathbb{R}^n$ and am getting nowhere and just don't see it. Anyone have any advice?