This article aims to address the optimization problems for continuous-time first-order and second-order multi-agent systems (MASs) with matrix-weighted networks. The matrix-weighted network is used to model the interdependence between agents’ multidimensional states, providing an effective approach to analyzing complex systems. The goal of optimization is that agents exponentially converge to the optimal value of the global cost function, which is formed by a sum of local cost functions. To achieve this goal, distributed optimization algorithms based on Hessian matrix and gradient information are constructed. Additionally, the edge-based event-triggered mechanism is utilized to avoid communicating with all neighbors at the time of event triggering while theoretically excluding Zeno behavior. The results show that the proposed algorithm can ensure that the intelligent body can achieve the optimization goal while reducing energy consumption. Eventually, an application is presented to substantiate the theoretical results.