Clarification from Griffiths Introduction to quantum mechanics A question from Appendix Linear algebra 
A.3 Matrices
on
page 441

"If you know what a prticular linear transformation does to a set of basis vectors, you can easily figure out what it does on any vector. For suppose that: $T |e_1\rangle = T_{11}|e_1\rangle+ T_{21}|e_2\rangle+ ... $"

Hi! I just can't understand what this $T_{ij} $ does. If  $T_{ij}$ is a matrix, and I apply it on basis vector, i would get a new vector. From where do other basis vectors e1, e2, .. in this equation come from? Or are they components of vector e1? Or are they inside $T_{ij}$?
 A: 
For suppose that: T|e1> = T11|e1>+ T21|e2>+...

First, recognize that $T_{ij}$ is a component of T on the basis, i.e.
$$T_{ij} = \langle e_i|T|e_j \rangle$$
In words, $T_{ij}$ is the 'amount' of $|e_i\rangle$ in the transformed basis vector $T|e_j\rangle$.

i apply it on basis vector, i would get a new vector. From where do
  other basis vectors e1, e2, .. in this equation come from?

Right, you get a new vector and, like any vector in the space, it has an expansion on the basis $|e_j\rangle$. For example, choose a vector in the space $|v\rangle$
$$|v\rangle = v_1|e_1\rangle + v_2|e_2\rangle + v_3|e_3\rangle + \cdots$$
where
$$v_i = \langle e_i|v\rangle$$
Now, $T|e_1\rangle$  is a vector in the space and so, just as with $|v\rangle$,
$$T|e_1\rangle = T_{11}|e_1\rangle + T_{12}|e_2\rangle + T_{13}|e_3\rangle + \cdots$$
where
$$T_{i1}= \langle e_i|T|e_1\rangle $$
A: I like to think in concrete visual examples, so I imagine $T$ to be an operator that, say, "Twists" basis vector $ |e_1\rangle$ into a new direction. In addition it stretches it, if not hermitian.  So, as you said, it produces a new vector. That vector may have components along any or all of the basis vectors of the space, just by virtue of the fact it's some new vector in the space.
I would say that's where the other basis vectors, you are wondering about, come from -- the space itself which they span, not from "inside $T$" or any individual basis vector.
