Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • 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.

Students Click Here

vb subroutine to invert a very large square matrix

vb subroutine to invert a very large square matrix

vb subroutine to invert a very large square matrix

Hello, I am looking for a VB subroutine to invert a large (possibly 1000X1000) fully populated square matrix stored as an array (?) for a weapon simulation program I am working on.  The matrix should be fairly stable.  It is actually to be run in a VB macro in Excel.  

I am sort of a novice at this point in vb programming.  

Any help in this area would be very much apprecited!!!

RE: vb subroutine to invert a very large square matrix

see if this helps:

RE: vb subroutine to invert a very large square matrix


Are you looking for the inverse to find the solution to the set of equations? If so, there are other methods (such as Gauss-Seidel) that will solve a large system but not return the matrix inverse. (Although the matrix inverse by itself can also be very useful.)

I have some subroutines that may help you (for solving systems and/or inverting a matrix), but it sounds like using the built-in Excel commands will take care of your problem.

RE: vb subroutine to invert a very large square matrix

Thankyou for responding!  What I am trying to do is to solve for the matrix J in the matrix operation, C*J=A, where C is a known fully populated n x n square matrix, J is a n x 1, and A is a another n x 1 but is only populated by values of 1.  Depending on the required accuracy, n could possibly be as high as 1000.

I have don ehtis in mathcad and the matrix appears fairly stable.  I want to be able to automate this since it is part of a parametric model that can be run multiple times and not need to be dependant on doing it in excel.

Anyone who could provide a "canned" subroutine would help tremendously!!

RE: vb subroutine to invert a very large square matrix


I'm currently developing routines to solve systems of linear equations for educational purposes (ie they don't have many optimizations and only have minimal error handling - they are mainly to show how the algorithms work). I've only tested them for n up to about 20 equations but so far have had excellent results.

The routines include finding the determinant, matrix inversion, Gauss elimination, Gauss-Jordan, Gauss-Seidel, and L-U decomposition. If you are interested contact me at jmgsjg823@hotmail.com and I'll email you some files. They are being developed in VB6.

RE: vb subroutine to invert a very large square matrix

I don't know if you have considered this, but
I believe Excel has an inherent limit.  I think
it is limited to 282 columns, which isn't an
insurmountable problem, but might be a problem
if you're looking for something quick and dirty
that runs in a macro on a 1000 by 1000 matrix.
Can someone else confirm this, or am I barking
at the moon?  Column IV is the max?

RE: vb subroutine to invert a very large square matrix

I believe the number is 256, not 282...

RE: vb subroutine to invert a very large square matrix

That's why I asked.  I had heard 256,
but when I looked it up it 'peared to be
282, A thru Z, plus AA thru IV.  I get
26 plus 256, i.e. 26 + 9(I is the ninth
letter)*26 + 22(V is 22nd letter) which
equals 26 + 9*26 + 22 = 282.  But I
admit 256 makes more sense, so I asked
for my own personal information.  Thanks.

RE: vb subroutine to invert a very large square matrix

hehehe... I didn't try to do the math, I just numbered all of the columns and looked to see what value the last one contained.  

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.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

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:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close