Linear equations, elimination matrix and matlab

medinaj2160
Messages
13
Reaction score
0

Homework Statement


For part 1 I solve the problem and I got the follow equation and results:

.25x+.10y+.05z=1.15
x+y+z=9
-2y+z=0

The solution is x=3, y=2, z=4

Now I have to solve this by hand with the equation in matrix form using elimination matrix

Your mathematical formulation in part 2 can be expressed as a matrix equation of the form, A x = y. We can duplicate the each step in the elimination process by multipling the left and right sides of the matrix equation by an appropriate elimination matrix or permutation matrix. Write down these steps and the calculations. Duplicate your work using MATLAB (with format rat)

Homework Equations



EAx = Eb

The Attempt at a Solution



A=[.25 .1 .05; 0 -2 1; 1 1 1];
B= [ 1.15; 0; 9]

Using Matlab I can solve it like this X= inv(A)*B = x=3, y=2, z=4 but that is not what he wants

to me the first elimination matrix is E= [1 0 0; 0 1 0; -1 0 1] but is not eliminating anything.
This may help some but I don't see how:
http://www.gregthatcher.com/Mathematics/GaussJordan.aspx"

How do I solve this by hand and then input it into matlab?

Thanks
 
Last edited by a moderator:
Physics news on Phys.org
medinaj2160 said:

Homework Statement


For part 1 I solve the problem and I got the follow equation and results:

.25x+.10y+.05z=1.15
x+y+z=9
-2y+z=0

The solution is x=3, y=2, z=4

Now I have to solve this by hand with the equation in matrix form using elimination matrix



Homework Equations



EAx = Eb

The Attempt at a Solution



A=[.25 .1 .05; 0 -2 1; 1 1 1];
B= [ 1.15; 0; 9]

Using Matlab I can solve it like this X= inv(A)*B = x=3, y=2, z=4 but that not what he wants

to me the first elimination matrix is E= [1 0 0; 0 1 0; -1 0 1] but is not eliminating anything.
This may help some but I don't see how:
http://www.gregthatcher.com/Mathematics/GaussJordan.aspx"

How do I solve this by hand and then input it into matlab?

Thanks

Do you mean you need to put the original matrix in row echelon form?

http://en.wikipedia.org/wiki/Row-echelon_form

.
 
Last edited by a moderator:
berkeman said:
Do you mean you need to put the original matrix in row echelon form?

http://en.wikipedia.org/wiki/Row-echelon_form

.

no! I was given this in part 1:


Consider the following word problem.

John is leaving the grocery store with a bag of groceries in one hand. He knows that the clerk should have given him $1.15 in change, but since he said that he needed some nickels, the clerk gave him a handful of coins which John put in his empty pocket. John is now wondering if he got the right change. With his free hand John can tell that he has 9 coins in his pocket, and he can also tell that he has twice as many nickles as dimes. If John was given the correct change, how many quarters should he have in his pocket?

Develop a mathematical formulation of this problem



List the unknowns.


State the relationships between the unknowns, and include the assumption that John has the correct amount of change.


List the equations and use elimination to solve for all the unknowns. Show the details of your work.


How many quarters should John have in his pocket?

which I solve, and is on my first post.

On the second part I am suppose to do this:

Your mathematical formulation in part 1 can be expressed as a matrix equation of the form, A x = y. We can duplicate the each step in the elimination process by multipling the left and right sides of the matrix equation by an appropriate elimination matrix or permutation matrix. Write down these steps and the calculations. Duplicate your work using MATLAB (with format rat).
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top