Power
Power(a, b)
a ^ brepresents
araised to the power ofb.
Note: Power has the Listable attribute and Power(x,y,z) is grouped as x^(y^z)
You can’t do matrix calculations with the ^operator:
>> {{2,1},{1,1}} ^ 2is computed as:
{{2^2,1^2},{1^2,1^2}}Use Inverse({{2,1},{1,1}}) or MatrixPower({{2,1},{1,1}},2) to calculate matrix inverses and powers.
Don’t confuse the ^ operator with the ^^ operator, which can be used for integer number bases other than 10.
Here’s an example for a hexadecimal number:
>> 16^^abcdefff2882400255See
Examples
>> 4 ^ (1/2)2
>> 4 ^ (1/3)4^(1/3)
>> 3^12348519278097689642681155855396759336072749841943521979872827
>> (y ^ 2) ^ (1/2)Sqrt(y^2)
>> (y ^ 2) ^ 3y^6Use a decimal point to force numeric evaluation:
>> 4.0 ^ (1/3)1.5874010519681994Power has default value 1 for its second argument:
>> a /. x_ ^ n_. :> {x, n}{a,1}Power can be used with complex numbers:
>> (1.5 + 1.0*I) ^ 3.5-3.682940057821917+I*6.951392664028508
>> (1.5 + 1.0*I) ^ (3.5 + 1.5*I)-3.1918162904562815+I*0.6456585094161581Infinite expression 0^(negative number)
>> 1/0ComplexInfinity
>> 0 ^ -2ComplexInfinity
>> 0 ^ (-1/2)ComplexInfinity
>> 0 ^ -PiComplexInfinityIndeterminate expression 0 ^ (complex number) encountered.
>> 0 ^ (2*I*E)Indeterminate
>> 0 ^ - (Pi + 2*E*I)ComplexInfinityIndeterminate expression 0 ^ 0 encountered.
>> 0 ^ 0Indeterminate
>> Sqrt(-3+2.*I)0.5502505227003375+I*1.8173540210239707
>> Sqrt(-3+2*I)Sqrt(-3+I*2)
>> (3/2+1/2I)^22+I*3/2
>> I ^ II^I
>> 2 ^ 2.04.0
>> Pi ^ 4.97.40909103400242
>> a ^ ba^b
>> Power(x,y,z)Power(x,Power(y,z))Related terms
Implementation status
- ✅ - full supported