How to express the power of a matrix

Hi, everyone!
I have one matrix is y(M*K,N). How to express y^2?
Thank you for your reply!

In general, that is non-convex, and squaring doesn’t even make sense unless y is a square matrix.

In some cases, such as if y is symmetric, and it appears as trace(y^2*X), where X is psd, it can be reformulated per CVX’s rules as square_pos(norm(sqrtm(X)*y,'fro')).

If you mean elementwise power, for instance .^2, then you can use y.^2

Thank you for your reply! I just missed some detail.
The matrix y is a variable, and I want to get the power of each element of the matrix.

use y.^p, where p is the desired positive power.

OK, thank you very much!