307,147 views
14 votes
14 votes
Explain how you can use absolute value to tell whether

the sum of two integers is positive or negative.

User Reggaemuffin
by
3.0k points

2 Answers

11 votes
11 votes

Explanation:

Let the numbers be x and y

If both are of same signs then

|x + y| = x + y

-|x + y| = -(x + y) = -x - y

If one is negative and one is positive

-|x + (-y)| = -|x - y| = -x + y

-|y + (-x)| = -|y - x| = -y + x

User SacJn
by
2.7k points
18 votes
18 votes

Answer:

Let the integers are p and q.

In case both integers are positive or negative, you add the numbers up and apply their sign to the sum.

Examples:

  • 10 + 88 = 98
  • -20 + (-15) = -35

In case one of the integers is negative and one positive.

  • p < 0, q > 0

Use absolute value in this case.

Subtract the numbers and apply the sign of the number with the greater absolute value.

Examples:

  • - 10 + 15 = |15 - 10| = |5| = 5
  • - 15 + 10 = - |15 - 10| = - |5| = -5
User Quetzaluz
by
3.0k points