More rigorous agreement of matrices (equal dims) before elementwise operations