I don't know when element-wise operation was released nor it always has been there.
A = [1, 2; 3, 4]
B = A^2
C = A.^2
Notice that B and C are not the same.
A^2 = A*A
A.^2 = [1^2, 2^2; 3^2, 4^2].
If your case is the multiplication of a matrix by a scalar, you can always check if the result is the same.
You can also check if you typed ˆ or ^.
The second one is the right one.
Aˆ2 will get you the error.
A^2 is fine.