-2

In the formula: $(a-b)^2= a^2-2ab+b^2$, let’s say we have $(-5k-5)^2$ then we put them in the formula, it will be: ($-5k)^2-2(-5k)(5)+(5)^2$. My question is that why don’t we include the “$-$“ sign with “$b$” but we include it with “$a$”, after all “$b$” is a negative integer with a negative sign just like “$a$”.

When we look at the quadratic formula or any other formula, when we are putting the values of variables we also include their signs. Why is this special case with $(a-b)^2= a^2-2ab+b^2$ that we just include sign of one variable not the other?

FD_bfa
  • 3,989
Ermac
  • 7
  • 2
    $$(a - b) \times (a - b) = (a + [-b]) \times (a + [-b]).$$ This equals $$a^2 + 2a[-b] + [-b]^2 = a^2 - 2ab + b^2.$$ The key point here is that $[-b] \times [-b] = b \times b.$ – user2661923 May 12 '22 at 07:13
  • 2
    When you say a formula, it refers to final result. Therefore there is no need to show intermediate steps in it. – Janaka Rodrigo May 12 '22 at 07:40
  • 4
    In $,a-b,$ the minus sign denotes the binary operation of subtraction, not the "sign" of $,b.,$ When we evaluate a (polynomial) function at some values of the variables we substitute only for the variables (not also for the operations - that more general pattern-matching is known as unification in rewrite-rule lingo - see here for a simple example). – Bill Dubuque May 12 '22 at 07:50
  • You can also avoid that both signs are negative by using $(-x)^2=x^2$. In this case you get $(5k+5)^2$ and you can apply the first formula directly. – Peter May 12 '22 at 07:54

1 Answers1

1

$$(a-b)^2 = a^2 - 2ab + b^2$$ is true no matter what sign $a$ and $b$ might be. But your choice of sign may not match the expression you wish to evaluate.

For instance, with your example $(-5k - 5)^2$, what would you choose for $a$ and $b$? You seem to be suggesting the choice $a = -5k$ and $b = -5$. But if you make this choice, note that $$a - b = (-5k) - (-5) = -5k + 5,$$ which is not the expression you want to evaluate.

So clearly, if we choose $a = -5k$, then we must choose $b = 5$ in order for $a-b$ to match $-5k - 5$. Your confusion ultimately stems from the question of how to choose $a$ and $b$ so that the identity corresponds to what you actually mean to evaluate, and not whether we regard the symbol "$-$" to mean negation or subtraction.

Note you could also have chosen $a = -5$ and $b = 5k$, since $$a - b = -5 - 5k = -5k - 5.$$

You could also have chosen $a = 5k$ and $b = -5$, which would give you $a-b = 5k-(-5) = 5k+5$, and the application of the identity will give the same result even though $a-b \ne -5k-5$, but only because $(-1)^2 = 1$.

heropup
  • 135,869
  • What is the point that you are trying to make? – Ermac May 12 '22 at 11:05
  • @Ermac I answered your question. I showed that if $b$ is negative, as you specifically asked about, then $a-b$ will not match the example expression you were trying to evaluate. If you do not understand why, then you need to articulate your question with a more specific remark than "what is the point you are trying to make." – heropup May 12 '22 at 13:50