diagonal matrix tests