I would like to add my two cents to André Nicolas's answer.
There are two definitions of the composition of binary relations in use. The choice of one of them is merely a matter of personal taste, and since you haven't given yours, I will choose for this post the definition I prefer.
Let $\rho$ and $\sigma$ be binary relations on a set $X$ and let $n$ denote $\operatorname{card}(X)$ (possibly infinite). We define $\rho\circ \sigma$ as follows.
$\rho\circ \sigma=\{(i,j)\in X\times X\,|\,(\exists x\in X)((i,x)\in \rho\wedge (x,j)\in \sigma)\}$
Let's use the less common symbol for the existential quantifier, that is $\bigvee$ instead of $\exists.$
$\rho\circ \sigma=\left\{(i,j)\in X\times X\,|\,\bigvee_{x\in X}((i,x)\in \rho\wedge (x,j)\in \sigma)\right\}$
Let now $\mathbb{B}=(\{0,1\},\vee,\wedge\}$ be the two-element Boolean algebra without the unary operation. We denote the set of all square matrices of size $n\times n$ (still possibly infinite) with entries in $\mathbb B$ by $\mathcal M_n.$ Let's suppose for a moment that $n<\infty.$ $\mathbb B$ is a semiring and there is a natural multiplication in the set of finite square matrices over a semiring. The definition is exactly the same as for rings or fields. For $\mathbb B$ we obtain the following definition.
Let $R=[r_{ij}],S=[s_{ij}]$ be matrices in $\mathcal M_n.$ We define $[t_{ij}]=R\cdot S\in\mathcal M_n$ by setting
$t_{ij} = \bigvee_{x=1}^n (r_{ix}\wedge s_{xj}),$
for $(i,j)\in\{1,...,n\}\times\{1,...,n\},$ where $\bigvee$ stands for summation in $\mathbb{B}.$ (That is, its meaning is formally different from the meaning of $\bigvee$ in the formula for $\rho\circ\sigma.$)
We see however that in this case there is no apparent reason to confine ourselves to finite matrices. Indeed, summation over infinite sets of indices is well-behaved in $\mathbb B$ and for infinite $n$ we can take the set $X$ as the set of indices instead of $\{1,...,n\}$. This time we define
$t_{ij} = \bigvee_{x\in X} (r_{ix}\wedge s_{xj}),$
for $(i,j)\in X\times X.$
The similarity between the formula for $\rho\circ\sigma$ and that for $R\cdot S$ is striking. It should be now an easy exercise to find an isomorphism between the set of all binary relations on $X$ with composition as an operation and the set $\mathcal M_n$ with the matrix multiplication defined above.