abstracting matrix