Matrix calculus for optimization | Zoonk