What sacrament is related to the sacrament of matrimony?

If you are talking about the sacraments in their categories, you are speaking of the Sacraments of Vocation.

Matrimony is the first of the vocational sacraments. The other is the Holy Orders. The Holy Orders are when a priest is ordained. In most situations, a person takes one sacrament or the other upon themselves. In few situations are they permitted both, but the Catholic church examines marriage of clergy members in special situations on a case by case basis.