Why can I solve an impossible equation using linear algebra? I am currently learning matlab and linear algebra side by side and I stumbled upon this example from mathworks

A = [1 2 0; 0 4 3];
b = [8; 18];
x = A\b

x = 3×1

     0
4.0000
0.6667


which in my mind translates to

$$
A = \left[
\begin{matrix}
1 &amp; 2 &amp; 0 \\
0 &amp; 4 &amp; 3
\end{matrix}\right]
B = \left[
\begin{matrix}
8 \\ 18
\end{matrix}\right]
x = \left[
\begin{matrix}
a \\ b \\ c
\end{matrix}\right]
$$

$$
Ax = \left[
\begin{matrix}
1 &amp; 2 &amp; 0 \\
0 &amp; 4 &amp; 3
\end{matrix}\right] \times \left[
\begin{matrix}
a \\ b \\ c
\end{matrix}\right] 
= \left[
\begin{matrix}
a + 2b \\ 4b + 3c
\end{matrix}\right]
$$

which boils down to
$$
\left[
\begin{matrix}
a + 2b \\ 4b + 3c
\end{matrix}\right] = \left[
\begin{matrix}
8\\ 18
\end{matrix}\right] \Rightarrow \begin{matrix}a + 2b = 8 \\4b + 3c = 18\end{matrix}
$$

which is an equation with 3 unknown (a, b and c) with two equations, which is impossible! Yes there is a solution
$$
x = \left[
\begin{matrix}
0 \\ 4 \\ 2/3
\end{matrix}\right]
$$

How can I solve an impossible equation (three unknown and two equations) using linear algebra?
If there are fewer equations than unknowns, usually there are many solutions. It is not impossible, but indeterminate.

An extreme example is this:  one unknown, but no equation !
The set of solutions $S = \{ x \vert Ax=b \}$ will be one of three cases:


No solution, $S = \emptyset$, $b \not\in \{ Ax \mid x\in V\}$, where $A: V \to W$.
One solution, $S = \{ y \}$
Infinite many solutions


The "impossible case" is 1., but your system is of case 3.