Section: Mathematical Operators
y = a ^ b
The exact action taken by this operator, and the size and type of the output,
depends on which of the two configurations of a
and b
is present:
a
is a scalar, b
is a square matrix
a
is a square matrix, b
is a scalar
a
is a scalar, and b
is a square matrix, the matrix power is defined in terms of the eigenvalue decomposition of b
. Let b
have the following eigen-decomposition (problems arise with non-symmetric matrices b
, so let us assume that b
is symmetric):
Then a
raised to the power b
is defined as
Similarly, if a
is a square matrix, then a
has the following eigen-decomposition (again, suppose a
is symmetric):
Then a
raised to the power b
is defined as
2 x 2
symmetric matrix
--> A = 1.5 A = <double> - size: [1 1] 1.5 --> B = [1,.2;.2,1] B = <double> - size: [2 2] Columns 1 to 2 1.0 0.2 0.2 1.0
First, we raise B
to the (scalar power) A
:
--> C = B^A C = <double> - size: [2 2] Columns 1 to 2 1.0150379454061658 0.2994961926062329 0.2994961926062330 1.0150379454061658
Next, we raise A
to the matrix power B
:
--> C = A^B C = <double> - size: [2 2] Columns 1 to 2 1.50493476200956966 0.12177289478697813 0.12177289478697809 1.50493476200956966