As part of the preparation for an Exam, I'm working through a simple double sum exercise that has a constant as the Summand. The exercise has the answer (result) available but not the resolution. I attempted to solve it, but apparently I've reached a wrong answer.
The question:
Calculate the following sum: $$\sum_{i = 1}^n \sum_{j = 1}^n 2$$
My attempted resolution:
$$\sum_{i = 1}^n \sum_{j = 1}^n 2 = \sum_{i = 1}^n \underbrace{(2 + 2 + \cdots + 2)}_{\text{n times}} = \sum_{i = 1}^n 2n = 2n \sum_{i = 1}^n 1 = 2n \times \underbrace{(1 + 1 + \cdots + 1)}_{\text{n times}} = 2n \times n = 2n^2$$
The right answer:
$$n^2 + n$$
What did I do wrong? How should I have solved this?
EDIT: Mistery solved! I had made a small but important mistake when I copied the question from the paper it was written. The lower limit of the inner sum is "j=i" ("j equals lowercase i") instead of "j=1" ("j equals one"). Thanks to everyone who commented (T.Bongers, Git Gud and, particularly, Mark Bennet who correctly guessed that I might have made a mistake in one of the limits).