Let $T:X \to Y$ be a linear operator and $\dim X=\dim Y<\infty$. Show $Y=\mathscr{R}(T)$ if and only if $T^{-1}$ exists, without dimension theorem. The problem I am trying to solve is:

Let $T:X \to Y$ be a linear operator and $\dim X = \dim Y = n < \infty$. Show that ${\scr{R}}(T)=Y$ if and only if $T^{-1}$ exists.

Here ${\scr{R}}(T) := \text{Range} \ T$.
This question asks the same thing but the answer uses the dimension theorem which has yet to be presented and so I am interested in if another proof exists.

My current progress:
The proof that the existence of $T^{-1}$ implies ${\scr{R}}(T)=Y$ follows by the following theorem:

Let $T:{\scr{D}}(T)\to Y$ be a linear operator whose inverse exists. If $\{x_{1},\dots,x_{n}\}$ is a linearly independet set in ${\scr{D}}(T)$ then $\{T x_{1},\dots,T x_{n}\}$ is linearly independent in Y.

The argument is: Since $\dim X=n<\infty$ there exists a linearly independent set of $n$ vectors $\{x_{1},\dots,x_{n}\}$ in $X$ and since $T^{-1}$ exists we get that $\{Tx_{1},\dots,Tx_{n}\}$ is a linearly independent set in $Y$ by the above theorem. Since $\dim Y=n$ the set $\{T x_{1},\dots,T x_{n}\}$ forms a basis for $Y$. So, for any $y\in Y$ there exists scalars $\alpha_{1},\dots,\alpha_{n}$ such that by the linearity of $T$:$$y=\alpha_{1}Tx_{1}+\dots\alpha_{n}Tx_{n}=T(\alpha_{1} x_{1}+\dots+\alpha_{n}x_{n}).$$
Therefore $y\in {\scr{R}}(T)$ and because $y\in Y$ was chosen arbitrarily ${\scr{R}}(T)=Y$.
Suppose now instead that ${\scr{R}}(T)=Y$. Then to prove that $T^{-1}$ exists it suffices to show that $T$ is injective. First let us pick a basis $\{y_{1},\dots,y_{n}\}$ for $Y$. Since ${\scr{R}}(T)=Y$ there exists vectors $x_{1},\dots,x_{n}\in X$ such that $T x_{1}=y_{1},\dots,T x_{n} = y_{n}$. Then it is immediate that if $Ta = Tb$ and we write $Ta$ and $Tb$ in terms of linear combinations of $Tx_{1},\dots,Tx_{n}$, that is
$$Ta = \alpha_{1}Tx_{1}+\dots+\alpha_{n}Tx_{n}, \quad Tb=\beta_{1}Tx_{1}+\dots+\beta_{n}Tx_{n}$$
it will result in $\alpha_{j}=\beta_{j}$ (since $\{Tx_{1},\dots,Tx_{n}\}$ is a basis).

Here I am stuck. I think the claim would follow either if $x_{j} \mapsto Tx_{j}$ was unique (but this is sort of what we want to prove). Or, if we can show the set $\{x_{1},\dots,x_{n}\}$ to be linearly independent.
Question:
Am I missing something obvious in this last argument and is the first part correct?
 A: If $T^{-1}$ exists, that is, if $T$ is invertible, then for any
$y \in Y \tag 1$
we have
$T(T^{-1}(y)) = y, \tag 2$
which shows that
${\scr R}(T) = Y, \tag 3$
that is, $T$ is surjective; likewise, if (3) holds, then
$X/\ker T \cong Y, \tag 4$
i.e., $X/\ker T$ and $Y$ are isomorphic as vector spaces; from this,
$\dim(X/\ker T) = \dim(Y); \tag 5$
but if
$\ker T \ne \{0\}, \tag 6$
then
$\dim(X/\ker T) < \dim X, \tag 7$
and (5) and (7) in concert yield
$\dim(Y) < \dim(X), \tag 8$
contradicting the given hypothesis $\dim(X) = \dim(Y)$; therefore
$\ker(T) = \{0\}, \tag 9$
and thus $T$ is injective; since $T$ is both surjective and injective, it is invertible, or in other words, $T^{-1}$ exists.
A: Let $x_1,...,x_n$ be a basis of $X$. Then $T(x_1),...,T(x_n)$ span $T(X)=Y$. Since $Y$ is $n$-dimensional, $y_1=T(x_1),...,y_n=T(x_n)$ is a basis of $Y$. Consider the linear map $S:Y\to X$ which takes every linear combination $\sum \alpha_iy_1$ to $\sum\alpha_ix_i$. Then $T\circ S$ ($T$ acts first is identity on the basis $x_1,...,x_n$. So $T\circ S$ is the identity map. Hence $S=T^{-1}$. Conversely, if for some $S: Y\to X$, $T\circ S=\mathrm{identity}$. Then $T$ is surjective.
