# Converting complex equations to matrix form

My question is a continuation of the topic:

How to convert equation to vector (matrix) form?

It is necessary to separate the components of equations into vectors and matrices and a combination of operations with them (scalar, vector product, etc.).

If we take one of the methods proposed in the previous topic, the link to which I attached to the message, then it is suitable only for equations, which in general terms can be represented as a scalar product of 3-dimensional vectors.

Does Mathematics have algorithms for solving such a problem for equations e1 and e2?

FullForm[-a11^2*b21^2 + a11^2*c21^2 - 2*a11*a21*c11*c21 +
a21^2*c11^2 + b21^2*c11^2]
prod = -a11^2*b21^2 + a11^2*c21^2 - 2*a11*a21*c11*c21 + a21^2*c11^2 +
b21^2*c11^2 //. {Times -> List, Plus -> List}
a = prod[[All, 1]];
u = prod[[All, 2]];


For example, we need to convert:

$$a_1 u_1+a_2 u_2+a_3 u_3$$

to the vector form of dot product A.U, where A={a1,a2,a3} and U={u1,u2,u3}

• So, to clarify, you want to factor these equations, then represent them in a matrix form? – CA Trevillian Feb 1 at 21:33
• That requires one to un-expand the operations involved, what kind of output are you expecting from your example. Can you give a simpler MWE? – CA Trevillian Feb 2 at 6:42
• Minimum working example--can you give some sample inputs/outputs so that we may know what you might be looking for? Using WL code to show some desired syntax would be beneficial also. Usually, an MWE is used to show the simplest example of the problem you would like to solve. – CA Trevillian Feb 2 at 7:01
• update your question with this – CA Trevillian Feb 2 at 7:04
• – CA Trevillian Feb 2 at 7:04