There is nothing special in the way we multiply matrices. In fact, we can generalize the notion of "sum" and "product" to other operations which behave similarly. In this work, I model the matrix multiplication over a arbitrary semiring and show that, by only changing what sum and product mean, different problems can be solve in a graph.