Added partition for matrices.