# tfm.optimization.math.hypot

hypot(*coordinates) -> value

Multidimensional Euclidean distance from the origin to a point.

sqrt(sum(x**2 for x in coordinates))

For a two dimensional point (x, y), gives the hypotenuse using the Pythagorean theorem: sqrt(xx + yy).

For example, the hypotenuse of a 3/4/5 right triangle is:

``````<pre class="devsite-click-to-copy prettyprint lang-py">
<code class="devsite-terminal" data-terminal-prefix="&gt;&gt;&gt;">hypot(3.0, 4.0)</code>
<code class="no-select nocode">    5.0</code>
<code class="no-select nocode">    </code>
</pre>
``````
[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]
{"lastModified": "Last updated 2024-02-02 UTC."}