Update for matrix basic function