I am confused with definition of tensor. Some texts give definition of tensor as
$n$th order tensor is a mapping $$ T: \mathbb {R^{n_d} \times \dots \times R^{n_d} \rightarrow R}$$
$ \mathbb {R^{n_d}}$ is real $n$dimensional space. We can make this definition for a special case, such as second order tensor.
I understand from this definition that tensor produces a real number. Is that a scalar (zero order tensor)?
On the other hand, some texts define a (second order) tensor as $$c_i = A_{mi}e_m$$
$A$ is second order and $c,e$ are first order tensors.
In this case, a second order tensor produces first order tensor.
So, what exactly a tensor gives out as a result - a first or second order tensor? Or am I making some mistake in understanding the definition? Can someone comment?