Take the 2-minute tour ×
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.

I'm finding myself getting back into math related stuff for the first time in a while. So please be patient with me.

How does $\frac{(n-i)(n-i+1)}{2}$ expand out to:

$\frac{n^2 - (2i - 1)n - i + i^2}{2}$

If you could show me step by step, I would really appreciate it.

Also, I apologise, but I really didn't know what to tag this with.

share|improve this question
2  
Retagged as (algebra-precalculus). –  KReiser Aug 2 '12 at 6:49

3 Answers 3

up vote 3 down vote accepted

We use the distributive property: $(a+b)c=ac+bc$ and $a(b+c)=ab+ac$.

Step by step, this gives us that

$$\frac{(n-i)(n-i+1)}{2}= \frac{n(n-i+1)-i(n-i+1)}{2}$$

$$\frac{(n-i)(n-i+1)}{2}= \frac{n^2-ni+n-ni+i^2-i}{2}$$

$$\frac{(n-i)(n-i+1)}{2}= \frac{n^2-2ni+n-i^2-i}{2}$$

Now, grouping $n-2ni = -(2i-1)n$, we get that

$$\frac{(n-i)(n-i+1)}{2}= \frac{n^2-(2i-1)n-i^2-i}{2}$$

share|improve this answer
    
I appreciate the formatting you used. Thank you! –  yoonsi Aug 2 '12 at 7:21
    
You're welcome. Glad I could help. –  KReiser Aug 2 '12 at 7:43

$$(n-i)(n-i+1)=n(n-i+1)-i(n-i+1)=nn-ni+n-in+ii-i=n^2+(-i+1-i)n+i^2-i=n^2+(-2i+1)n+i^2-i$$

share|improve this answer

$$(n-i)(n-i+1) = (n-i)n - (n-i)i + (n-i)$$ $$= n^2 - ni - ni + i^2 + n - i = n^2 - 2ni + n - i = n^2 - n(2i + 1) - i$$

share|improve this answer

Your Answer

 
discard

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.