A matrix approach for constructing quadratic APN functions