A linear transformation maps straight lines continuously to straight lines, equal distances on a single line to equal distances, and additionally the origin to the origin. Without the third condition, it's called an affine transformation.
Proof that those conditions are sufficient to recover the usual definition:
Be $V$ and $W$ vector spaces and $f:V\to W$ a function that fulfils those definitions. Be $v_1$ and $v_2$ vectors in $V$, and $w_i = f(v_i)$.
Since the origin is preserved, $f(0_V) = 0_W$.
Now consider the straight line $\{\lambda v_1: \lambda\in\mathbb R\}$. Since straight lines are mapped to straight lines, and a line is fixed by two points, we know that the image of the line is $\{\mu w_1: \mu\in\mathbb R\}$, where $\mu(\lambda)$ is by assumption a continuous function. We also know $\mu(1)=1$ because $w_1 = f(v_1)$.
Now since on a single line, equal lengths are mapped to equal lengths, we know that $f(\lambda v_1+v_1)=\mu(\lambda)w_1+w_1$. From that we can derive that for integer $n$, $f(n v_1)=n w_1$, and with an analogous argument that for any rational number $q$, $f(q v_1) = q w_1$. Continuity then gives us $\mu(\lambda)=\lambda$, that is, $f(\lambda v_1) = \lambda w_1$. Of course since $v_1$ is arbitrary, this is true for every vector.
Now consider the straight line going through $2\alpha v_1$ and $2\beta v_2$. This line is given by $\lambda 2\alpha v_1 + (1-\lambda) 2 \beta v_2$. This line is mapped to the straight line through $2\alpha w_1$ and $2\beta w_2$, given by $\mu(\lambda) 2\alpha w_1+(1-\mu(\lambda)) 2\beta w_2$. Clearly $\mu(0)=0$ and $\mu(1)=1$.
Now consider specifically $\lambda=\frac12$, that is, the point $\alpha v_1 + \beta v_2$. That point has equal distance from $2\alpha v_1$ and $2\beta v_2$. Therefore since equal distances on a line are mapped to equal distances, the image point also has to have equal distance from $2\alpha w_1$ and $2\alpha w_2$, that is, it must be the point $\alpha w_1 + \beta w_2$.
Therefore we have
$$f(\alpha v_1 + \beta v_2) = \alpha w_1 + \beta w_2 = \alpha f(v_1) + \beta f(w_2)$$
But this is the conventional definition of a linear function.