# Simplify (a-b-1)^2

(a-b-1)2
Rewrite (a-b-1)2 as (a-b-1)(a-b-1).
(a-b-1)(a-b-1)
Expand (a-b-1)(a-b-1) by multiplying each term in the first expression by each term in the second expression.
a⋅a+a(-b)+a⋅-1-ba-b(-b)-b⋅-1-1a-1(-b)-1⋅-1
Simplify each term.
Multiply a by a.
a2+a(-b)+a⋅-1-ba-b(-b)-b⋅-1-1a-1(-b)-1⋅-1
Rewrite using the commutative property of multiplication.
a2-ab+a⋅-1-ba-b(-b)-b⋅-1-1a-1(-b)-1⋅-1
Move -1 to the left of a.
a2-ab-1⋅a-ba-b(-b)-b⋅-1-1a-1(-b)-1⋅-1
Rewrite -1a as -a.
a2-ab-a-ba-b(-b)-b⋅-1-1a-1(-b)-1⋅-1
Multiply b by b.
a2-ab-a-ba-1⋅-1b2-b⋅-1-1a-1(-b)-1⋅-1
Multiply -1 by -1.
a2-ab-a-ba+1b2-b⋅-1-1a-1(-b)-1⋅-1
Multiply b2 by 1.
a2-ab-a-ba+b2-b⋅-1-1a-1(-b)-1⋅-1
Multiply -b⋅-1.
Multiply -1 by -1.
a2-ab-a-ba+b2+1b-1a-1(-b)-1⋅-1
Multiply b by 1.
a2-ab-a-ba+b2+b-1a-1(-b)-1⋅-1
a2-ab-a-ba+b2+b-1a-1(-b)-1⋅-1
Rewrite -1a as -a.
a2-ab-a-ba+b2+b-a-1(-b)-1⋅-1
Multiply -1(-b).
Multiply -1 by -1.
a2-ab-a-ba+b2+b-a+1b-1⋅-1
Multiply b by 1.
a2-ab-a-ba+b2+b-a+b-1⋅-1
a2-ab-a-ba+b2+b-a+b-1⋅-1
Multiply -1 by -1.
a2-ab-a-ba+b2+b-a+b+1
a2-ab-a-ba+b2+b-a+b+1
Subtract ba from -ab.
Move b.
a2-a-ab-1ab+b2+b-a+b+1
Subtract ab from -ab.
a2-a-2ab+b2+b-a+b+1
a2-a-2ab+b2+b-a+b+1
Subtract a from -a.
a2-2a-2ab+b2+b+b+1