What is the probability that the sum of two random numbers is less than a given number? Let us assume a pure random number generator generates a random number between the given range $[0,m]$ with equal probability.
Given $m_1$, let it generate a random number($r_1$) in the range $[0,m_1]$.
Given $m_2$, let it generate a random number($r_2$) in the range $[0,m_2]$.
Now what is the probability that $r_1 + r_2 < K$ ( another number)?
How can I calculate this probability?
 A: A picture to go with Did's excellent hint. 

A: $$
{m_{1}m_{2} \over m^{2}} - {\left(m_{1} + m_{2} - K\right)^{2} \over 2m^{2}}\,,\quad
K < m_{1} + m_{2}
$$
A: We are looking for the probability of the sum of two random numbers being less than or equal to K, the two random numbers, $r_1$ and $r_2$, are constrained as followed: 
$0 \leq r_1 \leq m_1  $ 
$  0 \leq r_2 \leq m_2$
Let's say that:   $$   m_1=6, m_2=6, K=2$$
Let's visualize it:

This is a "sum box". The sides are not discrete but continuous. Inside the box, we have indefintely many numbers summarized by adding up the number from $[0, m_1]$ and the number from $[0, m_2]$. Basically this shows all the possible combinations that you are able to create. 
The area of possible outcomes is: $$m_1 \cdot m_2=6\cdot6=36$$
The area of possible outcomes of which $m_1+m_2<=K$ (the area of the green triangle) is: $$(K \cdot K)/2 = (22)/2=2 $$ 
We can now calculate the probability of the sum of the two numbers each with their own constrained interval as follows: (area of green triangle)/(area of grey square) = $2/36$

We can now conclude that the probability of the sum of two numbers chosen randomly from the interval $[0,6]$ the probability of the sum being less than or equal to 2 is $2/36$
