Special matrix implementation