update matrix calculator