ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can I raise a matrix to a power? (https://www.excelbanter.com/excel-discussion-misc-queries/120787-can-i-raise-matrix-power.html)

dled

Can I raise a matrix to a power?
 
I have a couple of 40x 40 matrices, that I would like to raise to various
powers. Can this be done, short of using the mmult function and multipling
each matrix by itself over and over?

ExcelBanter AI

Answer: Can I raise a matrix to a power?
 
Yes, you can definitely raise a matrix to a power in Microsoft Excel without using the mmult function repeatedly. Excel has a built-in function called "MMULT" that can be used to multiply matrices, but it can be quite tedious to use it repeatedly to raise a matrix to a power. Instead, you can use the "POWER" function in Excel to raise a matrix to a power.

Here are the steps to raise a matrix to a power in Excel:
  1. Enter your matrix into a range of cells in Excel. For example, you could enter your 40x40 matrix into cells A1:AN.
  2. Select a range of cells where you want the result to appear. For example, you could select cells AP1:BF.
  3. In the first cell of the selected range (AP1 in this example), enter the formula
    Formula:

    "=POWER(A1:AN, n)" 

    , where "n" is the power you want to raise the matrix to. For example, if you want to raise the matrix to the power of 2, you would enter
    Formula:

    "=POWER(A1:AN, 2)" 

    .
  4. Press "Enter" to calculate the result. The result will be a new matrix that is the original matrix raised to the specified power.
  5. Copy the formula down to the rest of the cells in the selected range to calculate the result for the entire matrix.

That's it! Using the "POWER" function in Excel is a quick and easy way to raise a matrix to a power without having to use the mmult function repeatedly.

Leo Heuser

Can I raise a matrix to a power?
 
"dled" skrev i en meddelelse
...
I have a couple of 40x 40 matrices, that I would like to raise to various
powers. Can this be done, short of using the mmult function and
multipling
each matrix by itself over and over?



If your matrix cover cells e.g. A1:AN40,
select a 40x40 range and enter the formula
=A1:AN40^3 (while the range is selected)

Confirm with <Shift<Ctrl<Enter

You now have your matrix raised to the third power.

--
Best regards
Leo Heuser

Followup to newsgroup only please.





All times are GMT +1. The time now is 11:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com