cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

solving matrices

Jenny_Louise-di
1-Visitor

solving matrices

Sorry if this is not in the right folder,

I 'm having a little problem with matrices;

If you have a look at the worksheet you can see that i'm trying to find the unknowns of a few equations using the function given but i don't understand why it's not actually working.



please help



thanks a lot
26 REPLIES 26

On 11/15/2009 3:22:15 PM, Jenny_Louise wrote:
== I 'm having a little problem with matrices;
== If you have a look at the worksheet you can see that i'm trying to find the unknowns of a few equations using the function given but i don't understand why it's not actually working.

Problem one is that your zeros vector is of the wrong size; you've a 9x11 matrix times a 11x1 vector, giving a 9x1 result rather than 11x1.

Correcting that doesn't help that much as you have a very wide range of magnitudes in the main matrix - most numerical maths has about 15/17 digits of precision, so trying to combine numbers in the order of 20 with number in the order of 1016 is going to cause problems.

To get round this, use the function Minerr instead of Find. This at least gives an answer, even if it's not particularly close.

Perhaps one of the numerics experts will be around later ...

Stuart
RichardJ
19-Tanzanite
(To:StuartBruff)

On 11/15/2009 4:36:24 PM, stuartafbruff wrote:
>On 11/15/2009 3:22:15 PM, Jenny_Louise
>wrote:
>== I 'm having a little problem with
>matrices;
>== If you have a look at the worksheet
>you can see that i'm trying to find the
>unknowns of a few equations using the
>function given but i don't understand
>why it's not actually working.
>
>Problem one is that your zeros vector is
>of the wrong size; you've a 9x11 matrix
>times a 11x1 vector, giving a 9x1 result
>rather than 11x1.
>
>Correcting that doesn't help that much
>as you have a very wide range of
>magnitudes in the main matrix - most
>numerical maths has about 15/17 digits
>of precision, so trying to combine
>numbers in the order of 20 with number
>in the order of 1016 is going to cause
>problems.

Apart from those problems, there are 9 equations and only 8 unknowns.

Richard

I would note that the matrix shown at the top, with the comments, is not actually the matrix used in the solve block. Why the difference, I have no idea.
__________________
� � � � Tom Gutman

>I would note that the matrix shown at the top, with the comments, is not actually the matrix used in the solve block ...<<br> ____________________________

That is the question: what is the system to be solved ?


jmG

On 11/15/2009 4:36:24 PM, stuartafbruff wrote:
>On 11/15/2009 3:22:15 PM, Jenny_Louise
>wrote:
>== I 'm having a little problem with
>matrices;
>== If you have a look at the worksheet
>you can see that i'm trying to find the
>unknowns of a few equations using the
>function given but i don't understand
>why it's not actually working.
>
>Problem one is that your zeros vector is
>of the wrong size; you've a 9x11 matrix
>times a 11x1 vector, giving a 9x1 result
>rather than 11x1.
>
>Correcting that doesn't help that much
>as you have a very wide range of
>magnitudes in the main matrix - most
>numerical maths has about 15/17 digits
>of precision, so trying to combine
>numbers in the order of 20 with number
>in the order of 1016 is going to cause
>problems.
>
>To get round this, use the function
>Minerr instead of Find. This at least
>gives an answer, even if it's not
>particularly close.
>
>Perhaps one of the numerics experts will
>be around later ...
>
>Stuart

Hi,

thanks for all your help guys 😄
I haven't had internet for a few days so i havent been able to check this tread so now; yes i did a stupid mistake so the zero matrice was wrong. Thanks for pointing that out

Basically this problem regards beams and the reactions are reactions along the beams. I know the numbers on the big matrix look stupid...

On 11/23/2009 4:58:08 PM, Jenny_Louise wrote:

>Basically this problem regards beams and
>the reactions are reactions along the
>beams.

It's hard to imagine any physically meaningful problem where the numbers are over such a wide range. Are numbers calculated or experimental?

>I know the numbers on the big
>matrix look stupid...

It's not just that they "look stupid". If they are correct (which implies they are also of sufficient numerical accuracy, which would be very high) then there are fundamental numerical issues trying to solve those equations.

Richard

On 11/23/2009 4:58:08 PM, Jenny_Louise wrote:
...
>Hi,
>thanks for all your help guys 😄
>I haven't had internet for a few days so
>i haven't been able to check this tread
>so now; yes i did a stupid mistake so
>the zero matrice was wrong. Thanks for
>pointing that out
>
>Basically this problem regards beams and
>the reactions are reactions along the
>beams. I know the numbers on the big
>matrix look stupid...
___________________________

Jenny,

Please visit this web site

http://www.wag.caltech.edu/home/ajaramil/web.html

It's a site about robotics. It contain 23 Mathcad sheets version 7.0. Some sheets are reference used by other work sheets. One of the work sheet is the Mathcad built-in "constrained geninv(M)", i.e: the Pseudo-Inverse of special feature tol. From recollection it seems your "mat" is of the pseudo form, that you might have already treated in certain way but not knowing more, no collabs were able to turn the light bulb on.
Once downloaded, put them in a dedicated folder and recreate the references. It works here for me but not my cup of tea. The Mathcad geninv(M) is for square matrices. If your matrix is rectangular, more rows than cols, the solution is again via a pseudo matrix, this one is "Greville", While you were absent, myself and Viktor were on the "chemical reactions" and the solution of such difficult problems are now in hand for the next visitor.
Here is the stuff fresh from bakery.

Enjoy and hopefully you will find helpful.

jmG

On 11/15/2009 3:22:15 PM, Jenny_Louise wrote:
...
>I 'm having a
>little problem with matrices;
>...
...please help

thanks a lot
______________________________

Mathcad 11 has no problem. The solutions are in the last two columns (yellow). But you have to interpret the solutions. Revisit the attached.

jmG



RichardJ
19-Tanzanite
(To:ptc-1368288)

On 11/15/2009 6:15:18 PM, jmG wrote:

>
>Mathcad 11 has no problem. The solutions
>are in the last two columns (yellow).

What solutions? The first worksheet appears to be simply a copy of Stuart's sheet (even including all the scratch pad stuff he forgot to delete from the very end of the worksheet). The second worksheet doesn't address the question that was asked.

Richard

>I 'm having a little problem with matrices;
>If you have a look at the worksheet you can see that i'm trying to find the unknowns...<<br> _______________________________

I have addressed the problem, texto, solving "mat".
The 2nd work work sheet is the tutorial of the first one to support the solution,
as well as suggesting to complement/supplement the basis solution(s).

>The first worksheet appears to be simply a copy of Stuart's sheet < [Richard]

==> Sure, and what's wrong with it ?
==> That kind of stuff does not solve Given/ ...

jmG

On 11/15/2009 3:22:15 PM, Jenny_Louise wrote:
>Sorry if this is not in the
>right folder,
I 'm having a
>little problem with matrices;
>
If you have a look at the
>worksheet you can see that i'm
>trying to find the unknowns of
>a few equations using the
>function given but i don't
>understand why it's not
>actually working.

please
>help

thanks a lot
_______________________________

Make sure you plug the system as given or as concluded. Thanks Stuart for saving 11, that should help Jenny to review in consideration of my general interpretation, especially after two collabs have disagreed.

jmG



The Mathcad linalg is a bit short of the stuff.
Read + attached.

jmG

With so little to chew and various possible interpretations of "Reactions", the best of my understanding ends at this example of "Diophantine applied to chemical reactions".

By "reactions", do you mean "tensors" ?
If so, I don't have a good example.

jmG

On 11/16/2009 1:30:41 PM, jmG wrote:
>With so little to chew and various possible interpretations of "Reactions", the best of my understanding ends at this example of "Diophantine applied to chemical reactions".

Very bad example, I don't know Zoran work, but have two serious mistakes balancing the chemical equation in your ws.

One conceptual: it is not a diophantine problem. Values for compound coefficients are not mollecules at the practice, are moles of substance, further they can be anything enough bigger than Avogadro's number of mollecules.

The other mistake it's procedimental: you fix the e value to 3, which is not necessary, it can be any other value. This gives a better viewed answer, but not a 'better' answer.

The practical purpose for balancing equations it's the hability to know how many moles do you need of reactants to produce the products, or find which reactive it's the reaction limitant, or things like this.

So, and given that e it's the coefficient of the moles of the sulphuric acid, have not enough reasons to set this to 3 moles of substance, which only gives a minimial diophantine solution, but which isn't necessary at all to balance the equation.

Regards. Alvaro.

PD: Minimal diophantine solution it's this for a problem that have more than one, like Pitagoras theorem: 3,4,5 is the m.d.s. for the sides of a rectangle triangle, but there are others.

Maybe you should be a bit + flexible and think about the concept of the model. Certainly you can balance by moles rather than by chemical cook book. Nothing wrong with the demo, take or reject.

jmG

On 11/17/2009 12:47:35 AM, jmG wrote:
>Maybe you should be a bit + flexible ...

You're right, in the attached, why I think that it's better having reals into balancing equations, not only naturals.

Regards.

On 11/17/2009 1:10:49 AM, adiaz wrote:
>On 11/17/2009 12:47:35 AM, jmG wrote:
>>Maybe you should be a bit + flexible ...
>
>You're right, in the attached, why I
>think that it's better having reals into
>balancing equations, not only naturals.
>
>Regards.
___________________________

Read + at leisure, heavy stuff:

Abstract Linear algebraic techniques based on minimization of thermodynamic functional and/or other constraints are illustrated for mass balance of chemical reactions that do not exhibit stoichiometrically unique solutions in the linear algebraic vector space. The techniques demonstrate elegant casting of chemical equations in terms of generalized linear Diophantine matrices and generalized elimination and variational schemes.
Diophantine techniques - balancing chemical reactions - linear variation - thermodynamic functional.

In this work is given a new pseudoniverse matrix method for balancing chemical equations. Here offered method is founded on virtue of the solution of a Diophantine matrix equation by using of a Moore-Penrose pseudoinverse matrix. The method has been tested on several typical chemical equations and found to be very successful for the all equations in our extensive balancing research. This method, which works successfully without any limitations, also has the capability to determine the feasibility of a new chemical reaction, and if it is feasible, then it will balance the equation. Chemical equations treated here possess atoms with fractional oxidation numbers. Also, in the present work are introduced necessary and sufficient criteria for stability of chemical equations over stability of their extended matrices.





On 11/17/2009 1:10:49 AM, adiaz wrote:
>On 11/17/2009 12:47:35 AM, jmG wrote:
>>Maybe you should be a bit + flexible ...
>
>You're right, in the attached, why I
>think that it's better having reals into
>balancing equations, not only naturals.
>
>Regards.
______________________________

>Chemical reaction balance isn't a true Diophantine problem. < [Alvaro]

==> Nobody said that either.
==> The demo is only an introduction for more precise non linear-adapted Diophantine methods that you now have to visit and read more for your next classroom .

jmG

On 11/17/2009 2:11:34 AM, jmG wrote:

>>Chemical reaction balance isn't a true Diophantine problem. < [Alvaro]

>==> Nobody said that either.

>==> The demo is only an introduction for
>more precise non linear-adapted Diophantine methods that you now have to visit and read more for your next classroom .

1. I don't understand which is "more precise".
2. I don't use fractional oxidation numbers (states for others), then not need recolection for this kind of situations.
3. I don't understand if someone said that it's a diophanine problem: seems that you says yes. (I'm say not).

Regards. Alvaro.

Alvaro,

Don't argue with me, try to fill the gap between your outdated chemical background and the current applications of "modern maths + chemistry". I didn't write that stuff. I didn't put an equal sign between chemical reactions and Diophantine ... "they " did.

Quote:

" Abstract Linear algebraic techniques based on minimization of thermodynamic functional and/or other constraints are illustrated for mass balance of chemical reactions that do not exhibit stoichiometrically unique solutions in the linear algebraic vector space. The techniques demonstrate elegant casting of chemical equations in terms of generalized linear Diophantine matrices and generalized elimination and variational schemes.
Diophantine techniques - balancing chemical reactions - linear variation - thermodynamic functional".

Quote"

"In this work is given a new pseudoniverse matrix method for balancing chemical equations. Here offered method is founded on virtue of the solution of a Diophantine matrix equation by using of a Moore-Penrose pseudoinverse matrix. The method has been tested on several typical chemical equations and found to be very successful for the all equations in our extensive balancing research. This method, which works successfully without any limitations, also has the capability to determine the feasibility of a new chemical reaction, and if it is feasible, then it will balance the equation. Chemical equations treated here possess atoms with fractional oxidation numbers. Also, in the present work are introduced necessary and sufficient criteria for stability of chemical equations over stability of their extended matrices".

The bad aspect of this thread is that the visitor was in a step above the current collab reader and the specific problem. It seems that like in many cases, this visitor concluded the collab was the wrong place for help or just a chat box. That is not true: many of us can catch fast and make Mathcad work for them. Unfortunately for that visit, it will stop at some simple question(s) not answered: what size hole ? square/circular or else ? what material ? where to drill ? ... etc.

End of Diophantine chemical reactions.

jmG

Alvaro,

You read that three times, I did ...

""In this work is given a new pseudoniverse matrix method for balancing chemical equations. Here offered method is founded on virtue of the solution of a Diophantine matrix equation by using of a Moore-Penrose pseudoinverse matrix""

Read more, read the attached Mathcad 5.0, from Roumania, in french, add more if you feel you can. Your input/contribution will be welcomed !
In short: it reads that the Moore-Penrose pseudoinverse matrix method relates/solves the "not so pure" Diophantine chemical reactions.

jmG

Ice B. Risteski
2 Milepost Place # 606, Toronto, Ontario, Canada M4H 1C7.
Email: ice@scientist.com
The matrix method can be used for any type and complexity of system.
Smith, W. R.; Missen, R. W. J. Chem. Educ. 1997, 74, 1371.
Resumen. En este trabajo se presenta un nuevo m�todo generalizado
de matriz inversa para el balanceo de ecuaciones qu�micas. El m�todo
se basa en la soluci�n de una matriz homog�nea de ecuaciones usando
la matriz pseudoinversa de von Neumann. El m�todo se ha probado
en muchas ecuaciones qu�micas t�picas y se encontr� de gran utilidad
para todas las ecuaciones en una investigaci�n extensiva. El m�todo
funciona apropiadamente y no tiene limitaciones. Las ecuaciones
qu�micas mostradas aqu� poseen n�meros de oxidaci�n fraccionarios.
Tambi�n se analizan algunos criterios suficientes y necesarios para
la estabilidad de las ecuaciones qu�micas sobre la estabilidad de sus
matrices de reacci�n. Por este m�todo se da una manera formal de
balanceo de ecuaciones qu�micas generales con an�lisis de matrices.
Palabras clave: M�todo matem�tico, matrices, balanceo de ecuacio
ecuaciones qu�micas, estabilidad.

jmG

Jean.

I answer quickly because have not to much time right now.

Probably you're right, and must to check the new develops into balancing chemical reactions.

But what I see it's that there are some path that forgot the basis: chemical reactions, as are writed, are more conventions than real process. Have then, a big importance into the practice of the art (quasi-science) of making compounds.

For example: water isn't H2O, it's a simple convention to not complicate to much the things.

The introduction of this avanced methods must to be following for more exact formulation about the real state of the compounds.

So, let me more time to read about this questions and see how could be (or could'nt, the science isn't simple) implemented into a more readable form for the practical live into labs of factorys or hospitals.

But probably the answer it's that can't be more simple, and it's a difficult problem that requieres a very high level of preparation.

As comment, for historical reasons, I have pannic to diophantic problems: like a lot of people, I fail misserably trying to demonstrate Fermat's last theorem (bad demonstrations included, but without public presentations, fortunelly 🙂

Regards. Alvaro.

Alvaro,

Don't panic about the chemical new stuff. Many "Grand savants" seat every day on that. The method has some limitations as hinted in the paper, which paper is a piece of gold vs the mass of any kind of papers.

>like a lot of people, I fail miserably trying to demonstrate Fermat's last theorem <<br>
Fermat last theorem was considered a joke because he didn't belong to the "Clan of Mathematicians". Too much was written from the wrong start. The entire demonstration was in "the left margin". Trying to understand requires you admit few more theorems about continued fraction [descente infinie, Fermat] ... theorems Fermat was himself the sole possessor. A damned solid demonstration can be found in "C�l�bres Probl�mes Math�matiques" [Edouard Callendrau], few pages.

Cheers, Jean

One teacher of high school mine (Mr. Infantozzi) wrote some time ago an article in Scientific American (spanish edition, at least) about margin notes from Galois: hi (Infantozzi) undelete strikethrough in manuscripts, with a razorblade, and discover very interesting assertions from the big mathematician.

But actually, marginal note from Fermant only says that he have a demonstration for the theorem, but this margin it's not enough big to write them (or something like this). Obviusly, never write this claim in other place, or nobody find a paper with this.

Affirmation which make a very bad moth flavor in more of one guy but, as the years rais and the theorem don't down into the small bag of knows true assertions, the mysticism of the this marginal note lose glamour.

Regards. Alvaro.

On 11/16/2009 8:42:32 PM, adiaz wrote:
...
>One conceptual: it is not a Diophantine
>problem. Values for compound
>coefficients are not molecules at the
>practice, are moles of substance,
>further they can be anything enough
>bigger than Avogadro's number of
>mollecules.[Alvaro]
>_______________________

Don't worry for the Chemist who had only books before Mathcad and may not know "Diophantine". He will mix so many kilos of the reactants for so many kilos of the customer purchase order. And don't worry for the "Plant Process Engineer/Designer" to size the reservoirs of the reactants and don't worry for jmG to measure and batch-control the process on-line.

Read otherwise:
"literal chemical Diophantine balance".
Put your stuff in work sheet.

jmG



Announcements

Top Tags