For a discrete system of ℓ ℓ point charges or masses in the case of a gravitational quadrupole, each with charge q ℓ ℓ , or mass m ℓ ℓ , and position r ℓ ℓ = ( r x ℓ ℓ , r y ℓ ℓ , r z ℓ ℓ ) relative to the coordinate system origin, the components of the Q matrix are defined by: