Working through Mathematics for Machine Learning and got stuck on the end-of-chapter exercises 5.8a):
Calculating $\frac{\partial g}{\partial y}$ for $$g(y) = y^T S^{-1} y$$ with $y \in \mathbb R^{D}$ and $ S \in \mathbb R^{D×D}$
My solution (which is equal to this other one I found on GitHub): $$\frac{\partial g}{\partial y} = y^T (S^{-1} + ({S^{-1}})^T)$$ differs from the 'official' one: $$\frac{\partial g}{\partial y} = 2 y^T S^{-1}$$ Which solution is wrong? Or am I missing that both these solutions are equivalent?