Cardinal power $\kappa^\kappa$. When is it equal to $2^\kappa$?

Under what assumptions on an infinite cardinal $\kappa$ we have $$\kappa^\kappa= 2^\kappa?$$

Please delete this question. I know the answer.


Assuming $\kappa$ is an ordinal the answer is always.

The reason is simple: by Cantor's theorem we have $2&lt\kappa&lt2^\kappa$, therefore using exponentiation laws: $$2^\kappa\le\kappa^\kappa\le\left(2^\kappa\right)^\kappa=2^{\kappa\cdot\kappa}=2^\kappa$$