Hello All,
Does anyone have a complex number matrices inversion function?
Thanks,
Matt
[Solved] Complex Number Matrices Inversion
[Solved] Complex Number Matrices Inversion
OOo 3.2.0
Sony Vaio
Fedora 13
Sony Vaio
Fedora 13
Re: Complex Number Matrices Inversion
Is it a Beginner's question?* Board index ‹ Getting started ‹ Beginners
Does anyone have a complex number matrices inversion function?
http://wiki.services.openoffice.org/wik ... _functions
http://wiki.services.openoffice.org/wik ... _functions
http://www.oooforum.org/forum/viewtopic.phtml?t=64435
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
- Hagar Delest
- Moderator
- Posts: 33602
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Complex Number Matrices Inversion
Moved to Calc forum of course...
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 24.8 portable on Windows 11.
- MrProgrammer
- Moderator
- Posts: 5421
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Complex Number Matrices Inversion
Hi, and welcome to the forum.
Calc is probably the wrong tool for this. There is support for complex numbers, and there is support for matrix operations, but they don't really work well together. For example, you can multiply two complex numbers with IMPRODUCT, and you can multiply two real matrices with MMULT, but you can't multiply two complex matrices. That's because the complex number functions don't handle matrices and the matrix functions don't handle complex numbers. To the best of my knowledge, the situation is the same in other common spreadsheet packages including Excel and Gnumeric. (There is no IMMMULT function and I don't think any of the OpenOffice.org extensions help.)
What you need is a tool that supports mathematics, like APL or Mathematica.
But if you are willing to do some work, you can get Calc to give you the answer. Let's call your complex matrix (of dimension NxN) M. Separate it into its real and imaginary components R and J, each of which is also NxN, and then obtain S as J divided by i, so R and S contain only real numbers and M = R+Si. Create Q, a 2Nx2N real matrix:
Use Calc's MINVERSE function to find Q inverse, also of dimension 2Nx2N. Separate Q inverse into four NxN quadrants:
Then M inverse is A+Bi. Note, though, that you won't be able to multiply M by M inverse to verify that you get the identity matrix because Calc doesn't provide support for multiplying complex matrices. Actually, you could also do that with some additional work. Say we want to multiply M by P, both complex, both NxN. Separate M into R+Si and P into T+Ui where R, S, T, and U are all real matrices. Then calculate (using MMULT to multiply) X=R*T-S*U and Y=R*U+S*T and the product M*P is X+Yi.
If this answered your question please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Calc is probably the wrong tool for this. There is support for complex numbers, and there is support for matrix operations, but they don't really work well together. For example, you can multiply two complex numbers with IMPRODUCT, and you can multiply two real matrices with MMULT, but you can't multiply two complex matrices. That's because the complex number functions don't handle matrices and the matrix functions don't handle complex numbers. To the best of my knowledge, the situation is the same in other common spreadsheet packages including Excel and Gnumeric. (There is no IMMMULT function and I don't think any of the OpenOffice.org extensions help.)
What you need is a tool that supports mathematics, like APL or Mathematica.
But if you are willing to do some work, you can get Calc to give you the answer. Let's call your complex matrix (of dimension NxN) M. Separate it into its real and imaginary components R and J, each of which is also NxN, and then obtain S as J divided by i, so R and S contain only real numbers and M = R+Si. Create Q, a 2Nx2N real matrix:
Code: Select all
+R | +S
---+---
-S | +RCode: Select all
A | B
---+---
C | DIf this answered your question please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).