Problem with MINVERSE and MMULT

K

keith

Hello,

I am attempting to use the MINVERSE(.) and MMULT(.)
functions to
Solve a simultaneous equation where the x and y
coefficients are shown below.
Unfortunately, when the coefficients are changed, the
result of MINVERSE(.) updates, but not the result of MMULT
(.)
None of the combinations of the F9 key with other
appropriate keys forces the calculations to update. What
is going on, and what can I do about it?

The Excel sheet is set up as follows:

In range D3:E4 I have the following numbers

3 8
7 16


Using the procedure that outputs a function to a range for
MINVERSE(...)
I have the text

{=MINVERSE(D3:E4) }

in each of the cells in the range D6 through E7

Using the same procedure, I for the MMULT(.) function
I put the formula

{=MMULT(D3:E4,D6:E7)}

in each of the cells in the range D9 through E10


I'd appreciate your help.

Thanks

keith
 
A

Alan Beban

What's the evidence that the MMULT result doesn't update? When you
matrix multiply a matrix and its inverse, you should always get the same
result, the canonical form.

Alan Beban
 
K

Keith

Hi Alan,
Thanks for your note.

One example of the evidence is that the values in the
MINVERSE and MMULT cells change when the number 16 is
changed to a 14, and do not recalculate back to the
original values when the 14 is changed back to a 16. Give
it a try and see if it works for you.

Keith
 
A

Alan Beban

When I change the 16 to 14 and then press F9, the values in the MINVERSE
cells change, and the values in the MMULT cells continue to be 1,0;0,1
as expected (since they are the result of multiplying a matrix by its
inverse). So of course when I change the 14 back to 16 and press F9, the
MINVERSE cells' values change back and the MMULT cells *as expected*
still return the canonical form of the 2x2 matrix.

What are the values you get in the MMULT cells when you change the 16 to
14??? They shouldn't change; they should remain the canonical form that
results from matrix multiplying a matrix by its inverse.

Alan Beban
 
H

Harlan Grove

One example of the evidence is that the values in the
MINVERSE and MMULT cells change when the number 16 is
changed to a 14, and do not recalculate back to the
original values when the 14 is changed back to a 16. Give
it a try and see if it works for you. ...

That's the inverse of D3:E4.

Which could be replaced with

=MMULT(D3:E4,MINVERSE(D3:E4))

and that should either *ALWAYS* be either {1,0;0,1} or all #NUM! when singular.
This MMULT formula *DOES* recalc even though the result doesn't change. This is
no different than entering any number in X99, entering the formula =1/X99 in
X100, entering the formula =X99*X100 in X101, and complaining that X101 doesn't
recalc when you enter different numbers in X99.

Enter 6 and 14 in E3 and E4, respectively. Your MINVERSE function call should
recalc as all #NUM!. Does your MMULT function call also return all #NUM!? If so,
your MMULT formula is working as it should.
 
K

Keith

HI Alan,
Thanks for your reply.
Well of course, this afternoon, when I want to duplicate
everything, I can't seem to get the original values to
show up.

with E4 as 14, then the inverse matrix is
-1 0.57
0.5 -0.21

and the multiplied function is

1 0
0 1


with E4 = 16

-2 1
0.875 -0.375

and

1 4.4E-16
0 1


Now it all makes sense after you described it, because of
course the 4.4-E16 is a very small number.

But I wonder about the original purpose. My intention was
to solve simultaneous equations and I was using an
approach described in a book I saw at a local bookstore
(didn't buy the book -- just read it) and if the final
result is always a 1,0,0,1 matrix, then it seems unlikely
that the result would ever be a simultaneous equation
solution. I wonder what you think of that side of it.

Keith
 
K

Keith

Hi Harlan,
Thanks for your comments. I posted a longer response that
you might read in my response to Alan.
Thanks very much
keith
 
H

Harlan Grove

...
...
But I wonder about the original purpose. My intention was
to solve simultaneous equations and I was using an
approach described in a book I saw at a local bookstore
(didn't buy the book -- just read it) and if the final
result is always a 1,0,0,1 matrix, then it seems unlikely
that the result would ever be a simultaneous equation
solution. I wonder what you think of that side of it.
...

You should have bought the book. You start with a linear equation like

y = A x

where y and x are N row by 1 column vectors and A is an N by N matrix. To find
x, left multiply both sides of the equation by the inverse of A, A^-1. So

A^-1 y = A^-1 A x = (A^-1 A) x = I x = x

So your original problem was missing the y vector. If you have ranges y and A,
then x is given by

=MMULT(MINVERSE(A),y)
 
K

Keith

Hi Harlan

You are so right about buying the book.
Thanks very much for the info. I'll go to work on this.
Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top