Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are two points: $(x_1,y_1),(x_2,y_2)$, if $|y_2-y_1|>|x_2-x_1|$ then $\tan(A)=\frac{|y_2-y_1|}{|x_2-x_1|}$ else if $|y_2-y_1|<|x_2-x_1|$ then $\tan(A)=\frac{|x_2-x_1|}{|y_2-y_1|}$

My question is, how to express the above meaning in one formula? what kind of Mathematical symbol should I use? thanks.

share|cite|improve this question
I think it is bad form to define $\tan(A)$. The function $\tan$ already has a specific meaning. It is better to use cases to define the angle $A$, then let $\tan$ have the usual meaning. – Austin Mohr Jul 21 '14 at 21:48
Yes, you are right, it is better to define angle A. Thanks. So, if I define angle A, how to express? – Eric Huang Jul 21 '14 at 21:51
up vote 1 down vote accepted

As I mentioned in the comment, I think it is bad form to overload the $\tan$ function.

If you are doing many trigonometric operations with this triangle, then it is best to clearly define all its parts. Doing so allows you to use cases to choose the appropriate angle, and then the trigonometric functions can have their usual meaning.

If you just need this one value, then forget about $\tan$ altogether and write something like:

Let $a = \max\left(\dfrac{|x_2-x_1|}{|y_2-y_1|},\dfrac{|y_2-y_1|}{|x_2-x_1|}\right)$.

share|cite|improve this answer
thank you, I think it is better to use this form. – Eric Huang Jul 21 '14 at 22:00




where $\max(a,b)$ equals the greatest of $a$ and $b$

share|cite|improve this answer
Thanks very much for your inspiration. – Eric Huang Jul 21 '14 at 22:00
You're welcome! – Scientifica Jul 21 '14 at 22:02

$$\tan(A) = \begin{cases} |y_2 - y_1| \ge |x_2 - x_1| &: \huge{\frac{|y_2 - y_1|}{|x_2 - x_1|}} \\ \\ \\ |y_2 - y_1| \le |x_2 - x_1| &: \huge{\frac{|x_2 - x_1|}{|y_2 - y_1|}} \\ \end{cases}$$

share|cite|improve this answer
Sorry, I want to express it in one formula using some Mathematical symbol, such as sign or some else. Do you have other method ? Thanks. – Eric Huang Jul 21 '14 at 21:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.