Matrix Solutions to Linear Equations