I was wondering if there is an inbuilt Mathematica function that can take a vector $v$ whose components are sums of variables $x_1, x_2, \dots x_{n}$ and turn it into a matrix-vector product, where the matrix is just a coefficient matrix and vector is right and composed only of the variables? For example, is there a Mathematica function $F$ such that
$$\begin{pmatrix} x_{1} + 2x_{2} \\ 3x_{1} + 4x_{2}\end{pmatrix} \stackrel{F}{\to} \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \begin{pmatrix} x_{1} \\ x_{2} \end{pmatrix}$$
Essentially, I'm looking for a function that 'undoes' the matrix-vector multiplication. Apologies if this has been asked before or is very simple to implement, I'm not overly familiar with Mathematica and so I don't even know what to search for.
CoefficientArrays
? $\endgroup$