Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to find a value for L and S where:

  • P = 20
  • L = 2S + P
  • L + S + 3P = 1160

It's for deciding the column width in a website layout, which can change according the available screen size:

Site Layout wide and small

I tried giving L a random value that sounded about right (700) and then solving S using the first equation, but then the second simply turned out false, so that didn't work.

(Sorry if this question is too "amateuristic" for this site, but it doesn't look like there's a better SE alternative)

share|cite|improve this question
Do you know anything about matrices, Gaussian elimination, or linear algebra? – anon Jul 30 '11 at 14:11
@anon: Little. My math level is (high school) - (things I've forgotten) + (basic matrices and vectors used in game programming) – Bart van Heukelom Jul 30 '11 at 14:14
If you don't, the quickest fix would be to substitute $L=2S+20$ into the second equation to get $3S+80=1160$, which solves as $S=360$, and plugging $S$ into the first equation gives $L=740$. However if you know anything about the concepts I linked above there are more general approaches that work and that you might want to know about. – anon Jul 30 '11 at 14:15
up vote 2 down vote accepted

What you have is a system of linear equations. Several methods for solving these are described in this section of that article.

In the present case, the most direct solution would be to substitute $L$ from the first equation into the second one:

$$(2S + 20) + S + 60 = 1160$$

$$3S + 80 = 1160$$



Then plugging that into the first equation yields

$$L=2S + 20 = 2\cdot360+20= 720 + 20=740\;.$$

share|cite|improve this answer
I'm familiar with substitution and tried it, but the result was rather unhelpful (2S - 2S = 0). I probably did it wrong or with the wrong equations. Thanks – Bart van Heukelom Jul 30 '11 at 14:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.