Matrix Solutions to Systems of Equations