# Where should the exponent be written in numbers with units of measurement?

If you are to calculate the hypotenuse of a triangle, the formula is:

$h = \sqrt{x^2 + y^2}$

If you don't have any units for the numbers, replacing x and y is pretty straightforward: $h = \sqrt{4^2 + 6^2}$

But what if the numbers are in meters?
$h = \sqrt{4^2m + 6^2m}$ (wrong, would become $\sqrt{52m}$)
$h = \sqrt{4m^2 + 6m^2}$ (wrong, would become $\sqrt{10m^2}$)
$h = \sqrt{(4m)^2 + (6m)^2}$ (correct, would become $\sqrt{52m^2}$)

Or should I just ignore the unit of measurement in these cases?

-

@Pjennings: The Pythagorean Theorem is really about areas (the area of the square on the hypotenuse is equal to the sums of the areas of the squares on the legs), so it does make some sense to have $\text{m}^2$ along the way... – Isaac Feb 11 '12 at 18:22
– Raymond Manzoni Feb 11 '12 at 18:25
@Isaac: What I meant is that his question deals with lengths, so his final answer should be in terms a meters, a unit of length. – Holdsworth88 Feb 11 '12 at 18:27
@RaymondManzoni Thanks, I have updated sqrt() to sqrt{} – CheeseSucker Feb 11 '12 at 18:29

## 3 Answers

Suppose you have been given $x$ and $y$ in metres, and you'd like to know the quantity, $z=\sqrt{x^2+y^2}$. Then, as you have predicted this quatity will be in metres.

Two things have been involved:

Homogeneity of Dimension

Two quantities of different dimensions cannot be added. This is one of the axioms of numerical physics.

Example: It is clear that adding $5$ metres to $3$ seconds does not give a physically meaningful quantity that can be interpreted in real life.

Certain functions only take values in dimensionless quantities

For instance, $\sin (\sqrt{x^2+y^2})$ would not make sense even if $x$ and $y$ have same dimensions. This is a bit subtler, but this is what it is!

• Coming to your question, the first quantity you tell us in dimension of $m^{1/2}$ which is against your guess!

• The second quantity is dimensionally fine while numerically this is not what you want.

• The third quantity is fine in all ways.

My suggestion:

First manipulate the numbers and then the units separately. This is a good practice in Numerical Physics. The other answers have done it all at one go. But, I don't prefer it that way!

-

How do you avoid unit conversion errors (and other unit errors) if you manipulate the units and numbers separately? – Rex Kerr Feb 11 '12 at 20:41

The last one: $$\begin{align} h&=\sqrt{(4\text{ m})^2+(6\text{ m})^2} \\ &=\sqrt{16\text{ m}^2+36\text{ m}^2} \\ &=\sqrt{52\text{ m}^2} \\ &=2\sqrt{13}\text{ m} \end{align}$$

-

The last one is correct. The general idea is that you treat the unit as if it were another number:

$$\begin{align*}h &= \sqrt{(4\mathrm{m})^2+(6\mathrm{m})^2} \\ &= \sqrt{16\mathrm{m}^2 + 36\mathrm{m}^2} \\ &= \sqrt{52 \mathrm{m}^2} \\ &= \sqrt{52}\sqrt{\mathrm{m}^2} \\ &= \sqrt{52}\mathrm{m}\end{align*}$$

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 18, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9497596621513367, "perplexity_flag": "middle"}