# Homework Help: Linear Algebra Problem

1. Jan 15, 2010

### sdoug041

1. The problem statement, all variables and given/known data

Your doctor has asked you to take 5 units of vitamin A, 13 units of Vitamin B, and 23 units of vitamin C every day. There are three brands available in your local pharmacy which contain the following units of vitamins:

-------- vitamin A vitamin B vitamin C
Brand 1 --- 1 ------ 2 ------ 4
Brand 2 --- 1 ------ 1 ------ 3
Brand 3 --- 0 ------ 1 ------ 1

Find all combinations of pills that provide you with the exact daily requirement (no partial pills!).

2. Relevant equations

Gaussian algorithm / elimination

3. The attempt at a solution

I transposed to create an augmented matrix in which the required amount of each pills could be implemented in the matrix.

ie

---------------Brand 1--------Brand 2-------Brand 3 ------Total
Vitamin A --------1 --------------1 -----------0 -----------5
Vitamin B --------2 --------------1 -----------1 ---------- 13
Vitamin C ------- 4 --------------3 -----------1 ----------23

I tried to use Gaussian Algorithm to solve for each variable but I keep eliminating all the values in row 3 (ie 0 0 0 0). I do believe this implies infinite solutions, but obviously this cannot be true. Please help!

Thanks,

Steve

2. Jan 15, 2010

### Staff: Mentor

Before jumping in and creating an augmented matrix, write the equations that the augmented matrix is supposed to represent. Your equations will involve variables that you need to define.

3. Jan 15, 2010

### Dick

You are right! There are an infinite number of solutions to your equations. But only a finite number of those solutions are nonnegative whole numbers.

4. Jan 16, 2010

### sdoug041

Thank you for the replies,

I defined the values as x, y, and z. Is this what you meant Mark44?

Dick, I'm not entirely sure how to manipulate the matrix to solve for the whole number, positive solutions. Could you possibly shed some light on this?

Thanks guys.

5. Jan 16, 2010

### Dick

You need to actually solve the equations rather than just row reducing the matrix, as Mark44 suggested. Call b1,b2,b3 the number of pills in each brand and write three equation, solve for say b1 and b2 in terms of b3. Then think about what kind of numbers you can put in for b3.

6. Jan 16, 2010

### sdoug041

Thanks :). I think I got it now.

7. Jan 17, 2010

### memomator

Hi, i do not understand this question, can somebody help me start this question please?

8. Jan 17, 2010

I need to understand this question too.. Can someone please solve it! Cause I tried doing the matrices and I get a negative number for y!! Which is not possible!

9. Jan 17, 2010

### Dick

Show us what you did and how you got a negative number.

10. Jan 17, 2010

ok.. I did this:

---------------Brand 1--------Brand 2-------Brand 3 ------Total
Vitamin A --------1 --------------1 -----------0 -----------5
Vitamin B --------2 --------------1 -----------1 ---------- 13
Vitamin C ------- 4 --------------3 -----------1 ----------23

and i solved the matrix and ended up getting:

1 0 1 8
0 1 -1 -3
0 0 0 0

which doesn't make since!

11. Jan 17, 2010

### Dick

How do you know it doesn't make sense? Call b1, b2, and b3 the number of pills of each brand. What does your matrix tell you about the relation between them?

12. Jan 17, 2010

do u see the -ive number in b2???

13. Jan 17, 2010

### memomator

Ok i did get the solution: B1=8 and b1-b2=-3 and no solutions for b3 because brand three does not exist due to the fact that there are 0 vitamin A in that brand, and therefore not a solution because the doctor recommended brand 5 units of vitamin A.

I was wondering though what does b1-b2=-3 mean, because it is not possible to have a negative solution.

14. Jan 17, 2010

### memomator

Oh wait, B1=8 so B2 is 5 if i did substitution for the 2 equations. Please tell me if im on the right track.

15. Jan 17, 2010

### Dick

The numbers in your matrix aren't numbers of pills. They are the coefficients of the number of pills. E.g. the 1 0 1 8 line tells you 1*b1+0*b2+1*b3=8. How about the second line? The coefficients can be negative even though the b's can't.

16. Jan 17, 2010

### Dick

If you would show what you are doing I could tell you what you are doing wrong. If you don't, I can't.

17. Jan 17, 2010

### memomator

b1=8
b1-b2=-3
i sub b1 into b1-b2=-3
i get b2 to be 5
So 8 and 5 are the coefficent of the pills?

18. Jan 17, 2010

### Dick

No, I meant the first three rows of the matrix are coefficients. Neither one of your starting equations is right. How did you get them?

19. Jan 17, 2010

### memomator

i reduced it to row-echelon form and got

1 0 0 8
0 1 -1 -3
0 0 0 0

so the first column is b1 second is b2 thrid is b3

20. Jan 17, 2010

### Dick

Now I have to ask you how you got that. askmenow got:

1 0 1 8
0 1 -1 -3
0 0 0 0

and I think that's right.