For verification, there is LinearFunctionQ in the Wolfram Function Repository. For the actual conversion of equations to matrix-vector, CoefficientArays is the recommended method (that is to say, it's what we use in-house).
CoefficientArays
You may have a look at CoefficientArrays:
CoefficientArrays
In[1]:= CoefficientArrays[{a + x - y - z == 0, b + x + 2 y + z == 0}, {x, y, z}] // Normal Out[1]= {{a, b}, {{1, -1, -1}, {1, 2, 1}}}
It seems the source code is not available for this particular function.
Daniel, I examined LinearFunctionQ and found:
Hence your function is perfect (BTW: Is the source code available?).
My code may be overloaded, since it outputs detailed messages to tell the user exactly what is wrong with which equation. For simplicity, I think I'll throw that out and use your function.
Thanks for that hint!
Oh thanks, Daniel. I did not know this LinearFunctionQ. I will examine it.
One of the more tricky tasks is to verify that the given equations are linear indeed and contain no mixed terms with respect to the given variables.
I Know. I use the CoeffientList-tensors, which are easier to use.
CoeffientList