A result of Pólya states that every sequence of quadrature formulas Q n (f) with n nodes and positive Cotes numbers converges to the integral I(f) of a continuous function f provided Q n (f) = I(f) for a space of algebraic polynomials of certain degree that depends on n. The classical case when the algebraic degree of precision is the highest possible is well-known and the quadrature formulas are the Gaussian ones whose nodes coincide with the zeros of the corresponding orthogonal polynomials and the Cotes (Christoffel) numbers are expressed in terms of the so-called kernel polynomials. In many cases it is reasonable to relax the requirement for the highest possible degree of precision in order to gain the possibility to either approximate integrals of more specific continuous functions that contain a polynomial factor or to include additional fixed nodes. The construction of such quadrature processes is related to quasi-orthogonal polynomials. Given a sequence {P n } n≥0 of monic orthogonal polynomials and a fixed integer k, we establish necessary and sufficient conditions so that the quasi-orthogonal polynomials {Q n } n≥0 defined by Q n (x) = P n (x) + k−1 i=1 b i,n P n−i (x), n ≥ 0, with b i,n ∈ R, and b k−1,n 0 for n ≥ k − 1, also constitute a sequence of orthogonal polynomials. Therefore we solve the inverse problem for linearly related orthogonal polynomials. The characterization turns out to be equivalent to some nice recurrence formulas for the coefficients b i,n. We employ these results to establish explicit relations between various types of quadrature rules from the above relations. A number of illustrative examples are provided.