I installed the NCAlgebra package in the hope that it contains enough rules for symbolic work with most branch-matrix expressions.
<< NC`; << NCAlgebra`; NCGrad[X^T ** A ** X, X]
The result obtained did not suit me.
A X + A T X
First, the package does not work with transposition. And secondly, it does not distinguish between vectors and matrices. What do I need to consider when working with it and how to get the correct result in the form: