Let U and V be finite-dimensional vector spaces over an arbitrary field K, and S be a linear subspace of the space L(U, V ) of all linear maps from U to V . A map F : S → V is called range-compatible when it satisfies F (s) ∈ Im s for all s ∈ S. Among the range-compatible maps are the socalled local ones, that is the maps of the form s → s(x) for a fixed vector x of U .In recent works, we have classified the range-compatible group homomorphisms on S when the codimension of S in L(U, V ) is small. In the present article, we study the special case when S is a linear subspace of the space S n (K) of all n by n symmetric matrices: we prove that if the codimension of S in S n (K) is less than or equal to n−2, then every range-compatible homomorphism on S is local provided that K does not have characteristic 2. With the same assumption on the codimension of S, we also classify the range-compatible homomorphisms on S when K has characteristic 2. Finally, we prove that if S is a linear subspace of the space A n (K) of all n by n alternating matrices with entries in K, and the codimension of S is less than or equal to n − 3, then every range-compatible homomorphism on S is local.