We study solutions of a quadratic matrix equation arising in Riemannian geometry. Let S be a real symmetric n×n-matrix with zeros on the diagonal and let θ be a real number. We construct nonzero solutions (S,θ) of the set of quadratic equations \[\sum_kS_{i,k}=0\quad\text{ and }\quad\sum_{k}S_{i,k}S_{k,j}+S_{i,j}^2=\theta S_{i,j}\text { for }i<j.\] Our solutions relate the equations to strongly regular graphs, to group rings, and to multiplicative characters of finite fields.