  A result of P\'olya states that every sequence of quadrature formulas
$Q_n(f)$ with $n$ nodes and positive 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 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 $\left \{ P_{n}\right
\}_{n\geq0}$ of monic orthogonal polynomials and a fixed integer $k$, we
establish necessary and sufficient conditions so that the quasi-orthogonal
polynomials $\left \{ Q_{n}\right \}_{n\geq0}$ defined by \[ Q_{n}(x) =P_{n}(x)
+ \sum \limits_{i=1}^{k-1} b_{i,n}P_{n-i}(x), \ \ n\geq 0, \] with $b_{i,n} \in
\mathbb{R}$, and $b_{k-1,n}\neq 0$ for $n\geq 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.
