In this talk, we will present a generalized quadratic matrix constraint of the form $X^\top Q X=P$, where $P$ and $Q$ are given invertible matrices that are both either symmetric or skew-symmetric. Using a generalized scalar product, we provide geometrical descriptions of this constraint, viewing it as a Riemannian submanifold equipped with a canonical metric. To achieve feasible steps, we generalize four well-known retractions and their corresponding vector transports from Stiefel-type manifolds. Moreover, we incorporate optimization-related ingredients to address the constrained problem. Preliminary numerical experiments demonstrate the effectiveness of our proposed algorithm. This is a joint work with Bin Gao.