×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Matrix math with complex numbers

## Matrix math with complex numbers

(OP)
Hello,

I am considering taking some calculations that presently performed using MathCAD and creating an application to perform those calculations instead.  The calculations involve creating a matrix of complex numbers and performing some matrix math operations to arrive at the solution.  The complex matrices will be up to 200x200 in size and matrix inversion will be required.  My question is what development platform would make be the easiest to implement a program like this in?  Are there libraries out there for performing complex matrix inversion? Maybe add-ons that are useful? I was considering using the microsoft visual platform...

Thanks for your input and suggestions.

### RE: Matrix math with complex numbers

I recently converted some functions from Matlab into C++, using a complex matrix class of my own.  Having implemented the inverse using gaussian elimination, I found it far too slow to be practical (though fun to implement).

So I ended up using routines from lapack (ZGETRF and ZGETRI).  This involved copying my data out of the matrix into a regular C array in a presribed order, passing it to each of those lapack routines, then copying the result back into my matrix.  The result was orders of magnitude faster, even with all the copying.

This was done on HP-UX, Linux and Windows.

- Steve

### RE: Matrix math with complex numbers

If inversion is only required for solving simultaneous equations, you might be better off using Choleski LU decomposition.  It is about 5 times faster.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!