In a word of competition and increasing necessity for finding or developing more productive organisms, Genetics and Plant Breeding contributes importantly, analyzing and exploring their genetic variability. Mainly in Plant Breeding, mating designs are useful to estimate genetic variability of some population. In this sense breeders and geneticists might aim at some point to obtain covariance of relatives. However, depending on the complexity of a particular mating design, or a combination of them, some difficulties to identify this genetic covariance may occur. On this matter many results are available from the literature on Quantitative Genetics. However, their derivation may be, sometimes, cumbersome. The present work shows how to construct an algorithm, using simple matrix algebra, to obtain covariance of relatives, that could be implemented in any software that allow for matrix algebra calculation. Besides, it brings an extensive revision about important topics in quantitative genetics and the use of the method detailed on a practical problem.