Inverses of triangular matrices and bipartite graphs