Linear and quadratic graphs