#math/linear-algebra
A function $T: V\to W$ is **injective** if $Tu=Tv\implies u=v$ which is to say each input has a unique output. Similarly if $Tu\neq{}Tv\implies u\neq{}v$. Corollary: a function is injective when $\text{null }T=\{ 0 \}$. $T$ is **surjective** if $\text{range }T=W$.
A linear map from a larger finite-dimensional space to a smaller one is **not injective**. Example: $f : \mathbb{R}^{2}\to \mathbb{R}$ with $f(x,y)=x+y$. Each diagonal diagonal maps to the same output.
```tikz
\begin{document}
\begin{tikzpicture}[font=\footnotesize, line join=round]
\draw[->,gray] (-2.6,0) -- (2.7,0) node[right,black]{$x$};
\draw[->,gray] (0,-2.6) -- (0,2.7) node[above,black]{$y$};
\draw[blue!40,thick] (-2,1) -- (1,-2);
\draw[red,ultra thick] (-2,2) -- (2,-2);
\draw[blue!70,thick] (-1,2) -- (2,-1);
\draw[blue!90,thick] (0,2) -- (2,0);
\node[circle,fill=blue!40,inner sep=1.6pt] at (-1,0) {};
\node[circle,fill=red,inner sep=1.6pt] at (0,0) {};
\node[circle,fill=blue!70,inner sep=1.6pt] at (1,0) {};
\node[circle,fill=blue!90,inner sep=1.6pt] at (2,0) {};
\node[red,anchor=south east] at (-2,2) {$\mathbf{null } f$};
\node at (-1.7,-2.0) {domain $\mathbf{R}^2$ (fibers $x{+}y{=}c$)};
\draw[->,gray] (3.4,0) -- (3.4,2.6) node[above,black]{$\mathbf{R}$};
\foreach \t/\yy in {-1/0.0,0/0.7,1/1.4,2/2.1}{ \draw (3.33,\yy) -- (3.47,\yy); }
\node[circle,fill=blue!40,inner sep=1.6pt] at (3.4,0.0) {}; \node[anchor=west] at (3.5,0.0) {$-1$};
\node[circle,fill=red,inner sep=1.6pt] at (3.4,0.7) {}; \node[anchor=west] at (3.5,0.7) {$0$};
\node[circle,fill=blue!70,inner sep=1.6pt] at (3.4,1.4) {}; \node[anchor=west] at (3.5,1.4) {$1$};
\node[circle,fill=blue!90,inner sep=1.6pt] at (3.4,2.1) {}; \node[anchor=west] at (3.5,2.1) {$2$};
\draw[dashed,blue!40,->] (-1,0) to[bend right=18] (3.33,0.0);
\draw[dashed,red,->] (0,0) to[bend right=12] (3.33,0.7);
\draw[dashed,blue!70,->] (1,0) to[bend left=8] (3.33,1.4);
\draw[dashed,blue!90,->] (2,0) to[bend left=14] (3.33,2.1);
\end{tikzpicture}
\end{document}
```
A linear map from a smaller finite-dimensional space to a larger one is **not surjective**. Example: $f:\mathbb{R}\to \mathbb{R}^{2}$ with $f(x)=(x,x)$.
```tikz
\begin{document}
\begin{tikzpicture}[font=\footnotesize, line join=round]
% ---------- Domain: R (1-dimensional) on the left ----------
\draw[->,gray] (-4.2,-0.4) -- (-4.2,2.6) node[above,black]{$\mathbf{R}$};
\foreach \yy in {0.0,0.7,1.4,2.1}{ \draw (-4.27,\yy) -- (-4.13,\yy); }
\node[circle,fill=blue!40,inner sep=1.6pt] at (-4.2,0.0) {}; \node[anchor=east] at (-4.32,0.0) {$-1$};
\node[circle,fill=red,inner sep=1.6pt] at (-4.2,0.7) {}; \node[anchor=east] at (-4.32,0.7) {$0$};
\node[circle,fill=blue!70,inner sep=1.6pt] at (-4.2,1.4) {}; \node[anchor=east] at (-4.32,1.4) {$1$};
\node[circle,fill=blue!90,inner sep=1.6pt] at (-4.2,2.1) {}; \node[anchor=east] at (-4.32,2.1) {$2$};
% ---------- Codomain: R^2 (2-dimensional) on the right ----------
\draw[->,gray] (-2.6,0) -- (2.7,0) node[right,black]{$x$};
\draw[->,gray] (0,-2.6) -- (0,2.7) node[above,black]{$y$};
% range of T : the 1-dim subspace everything lands on (special -> red)
\draw[red,ultra thick] (-2.3,-2.3) -- (2.45,2.45);
\node[red,anchor=south west] at (1.7,1.9) {$\mathbf{range}\,T$};
% images T(t) sitting on the range line
\node[circle,fill=blue!40,inner sep=1.6pt] at (-1,-1) {};
\node[circle,fill=red,inner sep=1.6pt] at (0,0) {};
\node[circle,fill=blue!70,inner sep=1.6pt] at (1,1) {};
\node[circle,fill=blue!90,inner sep=1.6pt] at (2,2) {};
% witnesses to non-surjectivity: points never hit (open gray dots)
\node[gray,circle,draw,inner sep=1.8pt] at (-2,1) {};
\node[gray,circle,draw,inner sep=1.8pt] at (1,2) {};
\node[gray,circle,draw,inner sep=1.8pt] at (2,-1) {};
\node[gray,align=center,anchor=north] at (-0.1,-2.9)
{not in $\mathbf{range}\,f$ (open dots):\\ every point off the line is missed};
% ---------- dashed colored arrows: t --> T(t) ----------
\draw[dashed,blue!40,->] (-4.13,0.0) to[bend right=10] (-1,-1);
\draw[dashed,red,->] (-4.13,0.7) to[bend right=6] (0,0);
\draw[dashed,blue!70,->] (-4.13,1.4) to[bend left=6] (1,1);
\draw[dashed,blue!90,->] (-4.13,2.1) to[bend left=10] (2,2);
\end{tikzpicture}
\end{document}
```