Background: X-chromosomal loci present different inheritance patterns compared to autosomal loci and must be modeled accordingly. Sexual chromosomes are not systematically considered in whole-genome relationship matrices although rules based on genealogical or marker information have been derived. Loci on the X-chromosome could have a significant contribution to the additive genetic variance, in particular for some traits such as those related to reproduction. Thus, accounting for the X-chromosome relationship matrix might be informative to better understand the architecture of complex traits (e.g., by estimating the variance associated to this chromosome) and to improve their genomic prediction. For such applications, previous studies have shown the benefits of combining information from genotyped and ungenotyped individuals. Results: In this paper, we start by presenting rules to compute a genomic relationship matrix (GRM) for the X-chromosome (G X) without making any assumption on dosage compensation, and based on coding of gene content with 0/1 for males and 0/1/2 for females. This coding adjusts naturally to previously derived pedigree-based relationships (S) for the X-chromosome. When needed, we propose to accommodate and estimate dosage compensation and genetic heterogeneity across sexes via multiple trait models. Using a Holstein dairy cattle dataset, including males and females, we then empirically illustrate that realized relationships (G X) matches expectations (S). However, G X presents high deviations from S. G X has also a lower dimensionality compared to the autosomal GRM. In particular, individuals are frequently identical along the entire chromosome. Finally, we confirm that the heritability of gene content for markers on the X-chromosome that are estimated by using S is 1, further demonstrating that S and G X can be combined. For the pseudo-autosomal region, we demonstrate that the expected relationships vary according to position because of the sex-gradient. We end by presenting the rules to construct the 'H matrix' by combining both relationship matrices. Conclusions: This work shows theoretically and empirically that a pedigree-based relationship matrix built with rules specifically developed for the X-chromosome (S) matches the realized GRM for the X-chromosome. Therefore, applications that combine expected relationships and genotypes for markers on the X-chromosome should use S and G X .