Viewing Matrices and Probability as Graphs

Viewing Matrices and Probability as Graphs

As suggested, let’s further think of $X$’s elements as being ${\color{Green}\text{green}}$ and $Y$’s elements as being Then a matrix $M$ corresponds to a weighted bipartite graph in the following way: the vertices of the graph have two different colors provided by ${\color{Green}X}$ and ${\color{RubineRed} Y}$, and there is an edge between every $x_i$ and $y_j$ which is labeled by the number $M_{ij}$. For instance…

Given two matrices (graphs) $M\colon {\color{Green}X}\times and $N\colon {\color{RubineRed}Y}\times we can multiply them by sticking their graphs together and traveling along paths: the $ij$th entry of $MN$, i.e. the value of the edge connecting $x_i$ to $z_j$, is obtained by multiplying the edges along each path from $x_i$ to $z_j$ and adding them together. Because a matrix $M\colon X\times Y\to\mathbb{Z}_2$ is the same thing as a relation.

Source: www.math3ma.com