I need to make this formula enter image description here

This is what I have so far:

              1  \mathrm{if} x>0\\
              -1 \mathrm{if} x<0 (1)\\
              0 \mathrm{otherwise}

Which it is correct just not sure how to space it properly.


The formula attached in the image is not typeset right. It uses array, which is not the right tool in this case. amsmath offers you cases which is exactly for this purpose.

              1 & \text{if $x>0$}\\
              -1 & \text{if $x<0$}\\
              0 & \text{otherwise}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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