matrix for problems 81,82,83