To find the length of a segment, you can use the distance formula:
[tex]d=\sqrt[]{(x_2-x_1)^2+(y_2-y_1)^2}[/tex]where (x1, y1) and (x2, y2) are the points of interest. Replacing with (0,0) and (2,4):
[tex]\begin{gathered} d=\sqrt[]{(2-0)^2+(4-0)^2} \\ d=\sqrt[]{4+16} \\ d=\sqrt[]{20} \\ d=\sqrt[]{4\cdot5} \\ d=\sqrt[]{4}\cdot\sqrt[]{5} \\ d=2\cdot\sqrt[]{5} \end{gathered}[/tex]