I want to do linear regression between vector inputs and vector output. That is each $y$ is a vector with $M$ components, and each $x$ is a vector with $N$ components and the answer should look like $y \sim Ax + b$ where $A$ is an $M \times N$ matrix and $b$ is a vector with $M$ components.
I have a very clear understanding of the concept and what I want R to do, but it is the proper syntax I am lacking.
Trying to google around to find this has been quite difficult because terms like multivariable seem to always point me to answers of the form
$$y \sim x_1 + x_2 + x_3 + \dots + x_n$$
where there are multiple input sources (or rather, a multidimensional input), but never with multidimensional outputs.
If I just feed in matrices for $y$ and $x$ that MIGHT give what I want, but it might also just treat each $y$ component as directly related to each $x$ component and give an answer based on that ($M = N$ for the important instance I have). So I have to be sure that I am doing it correctly.
What is the correct means for using R to do linear regression of the sort
$$y \sim A x + b $$
where the solution $A$ is an $M \times N$ matrix, and $b$ is a vector of length $M$, and each datum $x$ is a vector of length $N$ and each corresponding datum $y$ is a vector of length $M$?