Start implementation for graph matrix.