# Are there any symbolic solvers that can use matrices and vectors directly?

I frequently deal with matrix/vector calculus problems and would like to get the answers in matrix/vector form. The number of elements in these matrices and vectors is not specified, and the desired results are in matrix form anyway, not exploded out elements.

For example: d/dx x'Cx = x'(C'+C)

(x is column vector, C is a matrix and ' means transpose)

Is there a symbolic solver that could tell me that? As it stands now, I can use Matlab's solver if I make example vectors and matrices with all elements specified, but then it's on me to interpret the mess that comes out and try to form it back into the original matrices and vectors.

• I think sympy has some ability to deal with vectors, but I’m not sure whether it fits your requirements Jan 17, 2022 at 22:15
• It works like a charm: In [7]: diff(v.T*C*v,v) -> Out[7]: C*v + C.T*v. If you want to make an answer I'll mark it solved. Thanks. Jan 17, 2022 at 22:53
• done, glad it helped! Jan 17, 2022 at 23:17