# Finding a combined ratio from two other ratios

So I have a problem with ratios that I need to sort out.

I want to know how much of each of two types of food I need to eat in order to get a fixed amount of protein and carbs.

an example...

I want to eat 33g of protein and 44g or carbs in one meal (more importantly a ratio of 0.75 protein to carbs for this meal).

My two foods are chicken (28.9g protein, 0.5g carbs per 100g) pasta (6g protein, 31g carbs per 100g)

So, how many grams of chicken and how many grams of pasta do I eat in order to get 33g protein, 44g carbs?

Thanks

Fun question. We can write the following equations:

28.9x + 6y = 33; 0.5x + 31y = 44

Which gives us x = .85, y = 1.4 (roughly).

So 85 grams of chicken, and 140 grams of pasta.

I see that this is an example, and not the problem you want solved, so let me elaborate further.

Let x be the factor of 100 g of chicken you have to eat. Let y be the factor of 100 g of pasta you have to eat. Since we know how much protein is in 100 grams of both food, the total protein is:

28.9x + 6y = protein

And similarly, the total amount of carbs is

0.5x + 31y = carbs

Now, you know your goal, so set the "protein" equation to 33 and the "carbs" equation to 44.

28.9x + 6y = 33 0.5x + 31y = 44

Now, we can find x and y with some basic algebra. First, solve for x in the first equation. Then, plug that result into the second equation's x. Then, you can find the value of y. This allows you to find the value of x, by plugging y's numeric value into either equation.

When you have x and y, you have the factors of 100g for chicken and pasta, so 100x and 100y are the numbers you seek.

• I don't quite understand what you mean by 'not the problem you want solved'. Actually it is EXACTLY what I wanted solving! And it's even the way that I have ended up going. Thanks a lot for this answer Commented Apr 8, 2014 at 9:51
• You're welcome. I'm glad it was the problem you wanted solved. When you mentioned it was an example, I thought that simply providing you with the solution to that example would not be helpful to you, rather than providing a method to solve it on your own. Commented Apr 8, 2014 at 11:36

Let $c$ be the number of grams of chicken and $p$ the number of grams of pasta you eat. What are the equations and the constraints governing your problem, in terms of $c,p$? Could you solve this equation?

• That's kinda what I'm asking. It's been almost 20years since I've done equations and what not. Though I have just found a page on a GCSE website about simultaneous equations that might help me out. Commented Apr 7, 2014 at 15:47

EDIT: see bottom for a method of creating any number of combinations to create this proportion (0.75) of protein and carbs.

We can set this up as a matrix, and solve for any any combination of your choosing.

Firstly, write out the equations for this problem (the equation for protein, and the equation for carbs):

28.9*(chicken) + 6*(pasta) = 33

0.5*(chicken) + 31*(pasta) = 44

Note that the chicken values are both on the left, and the the pasta values on the right. We can use these numbers to create vectors as follows: for chicken (28.9g protein; 0.5g carbs) the vector is $\begin{bmatrix}28.9\\0.5\end{bmatrix}$ (protien value on top, carbs on bottom, as that is how I arranged the equations above). The vector for pasta (6g protein; 31g carbs) is $\begin{bmatrix}6\\31\end{bmatrix}$

Finally, we can form a matrix from these equations (see the vectors above) as follows: $\begin{bmatrix}28.9 & 6 & 33\\0.5 & 31 & 44\end{bmatrix}$

Note that our goal can be described as follows: find values c1 and c2 such that:

c1*$\begin{bmatrix}28.9\\0.5\end{bmatrix}$ + c2*$\begin{bmatrix}6\\31\end{bmatrix}$ = $\begin{bmatrix}33\\44\end{bmatrix}$

Upon row reducing the matrix, we get: $\begin{bmatrix}1 & 0 & 0.85\\0 & 1 & 1.4\end{bmatrix}$

As equations, this equates to:

1*x + 0*y = 0.85 = c1 (how many servings of chicken we need)

0*x + 1*y = 1.4 = c2 (how many servings of pasta we need)

If you only care about the proportion, then you can scale this vector to produce an infinite number of combinations that create the same proportion of protein to carbs. For instance, multiply by 10 to get 8.5 servings of chicken and 14 servings of pasta. This will give you (roughly) 330g of protein and 440g of carbs, for a proportion of 0.75 protein:carbs.

• I appreciate your help, and think it might be beneficial in the future, but I don't understand how you did the row reducing on the matrix? I know nothing about matrixes. Commented Apr 8, 2014 at 9:52
• Oh no! For some reason I can't upvote your answer as I don't have a high enough reputation yet?! I'm sorry, I think the answer is probably more helpful in the long term if I ever need to convert multiple foods, but the answer I have accepted works for me already, without needing to have the step of row reducing explained. Commented Apr 8, 2014 at 9:53