
Luke J. answered 11/29/21
Experienced High School through College STEM Tutor
Given:
The sum of two numbers are 12
The difference is -2.
Find:
What are the two numbers that satisfy the constraints
Solution:
Let's call one number the variable 'a'
And call the second number the variable 'b'
Thus, the constraints presented by the prompts are:
a + b = 12
a - b = -2
Note: the order that I did in the second equation DOES NOT NECESSARILY HAVE TO BE IN THAT ORDER, you could do b - a and the second equation still satisfies the given constraint.
a - b and b - a are "technically" equivalent because you could rename b -> -b and a -> -a and reverse the order of the second equation. So the 2 numbers results will just be swapped in the final solution if you did b - a instead of my assumed a - b
Anyway,
If this is under the scope of linear algebra, you could make a 2x2 matrix with 1's across the top row and 1 followed by -1 in the bottom row, like so:
[ 1 1 ] [a] [12]
[ 1 -1 ] [b] = [-2]
And do any of the forms of matrix math (reduced row echelon form, invert the constant matrix on the left (that could break if the constant matrix isn't invertible), Kramer's method, and so on)
I'm going to use a simpler form and then you can cross check the answers I get here with any of those other methods to verify you or I have done them correctly
Before most of the other methods were produced, most times, we can add or subtract equations from one another, produce a "third" equation and possibly rule-out or ELIMINATE (hint hint) other variables to isolate the value of one of them.
So, if you add equation 1 to equation 2, you'll get
a + a + b - b = 12 + (-2)
2a = 10
Therefore, a = 5
And using either equation (I'll use equation 1):
5 + b = 12
Therefore, b = 7.
Thus, the final answer to the problem is a = 5 and b = 7
As per my starting note, if I had instead done b - a = -2, I WOULD have gotten, a = 7, b = 5 because the swapping of the negative sign swaps what variable gets one of the two numbers
But 5 and 7 are the only two numbers that satisfy the constraints.
I hope this helps! Message me in the comments on anything that you have questions on, corrections I need to make or anything else!