Before we start, let us re-anchor every symbol so a newcomer never trips:
Why z=0 is the border, one more time in plain words: logistic regression outputs P(y=1∣x)=σ(z) where σ is the sigmoidσ(z)=1+e−z1. The two classes tie at 0.5, and σ(z)=0.5 happens only at z=0 because the sigmoid climbs strictly upward (never repeats a value). So "P=0.5" and "z=0" are the same event.
Look at the figure: the amber line is z=0. The cyan arrow is w, poking perpendicular to the line toward the class-1 side. Points get a signed distanced(x)=∥w∥w⊤x+b,
where ∥w∥=w12+w22+… is the arrow's length. Positive d ⇒ class 1, negative ⇒ class 0. We use division by the length so the distance is measured in real graph-paper units, not stretched by how big we made w.
WHAT: set the score to zero. WHY: border ⇔ z=0.
3x−6=0⇒x=2.
For x>2: z>0⇒σ(z)>0.5⇒class 1. For x<2: class 0.
Answer: boundary at ==x=2==; class 1 lies to the right.
Recall Solution 1.2
Linear means every feature appears to the first power, no products, no squares.
(a) linear ✅ — a straight line. (b) has squares → circle. (c) has a product x1x2 → hyperbola.
Answer: only (a).
Boundary:z=0⇒2x1+x2=4.
Intercepts: set x2=0⇒x1=2, giving (2,0). Set x1=0⇒x2=4, giving (0,4).
Classify (1,1):z=2(1)+1−4=−1<0⇒class 0.
Classify (3,0):z=2(3)+0−4=2>0⇒class 1.
See the figure below — both points sit on opposite sides of the amber line.
Recall Solution 2.2
WHY use the length: raw z is stretched by how big w is; dividing by ∥w∥ gives true units.
z=3(4)+4(2)−10=12+8−10=10.∥w∥=32+42=25=5.d=510=2.
Positive ⇒ class 1, and it lies exactly 2 units on the class-1 side.
WHAT: a threshold t means boundary at σ(z)=t, i.e. z=ln1−tt.
z=ln0.20.8=ln4≈1.3863.
So x1+x2−2=ln4⇒x1+x2=2+ln4≈3.3863.Orientation: the coefficients of x1,x2 (i.e. w=(1,1)) are unchanged, so the line only slides parallel to itself; its tilt is identical. Raising the threshold pushes the border toward the class-1 region (need more evidence to call "1").
Recall Solution 3.2
Boundary of A: x1+2x2−3=0.
Boundary of B: 5x1+10x2−15=0. Divide every term by 5:
x1+2x2−3=0.
Identical set of points ⇒ same boundary. Since zB=5zA, wherever zA=0 we also have zB=0; the factor 5 never changes the zero-set — it only makes the sigmoid steeper (higher confidence away from the line).
WHY squared features: a plain line can never bend; but the same linear rule on new features x12,x22 traces a curve when we plot back in (x1,x2) (see Feature Engineering).
Want boundary x12+x22=9, i.e. x12+x22−9=0. So
z=x12+x22−9,w0=−9,w3=1,w4=1.Classify (1,1):z=1+1−9=−7<0⇒class 0 (inside the circle).
Classify (4,0):z=16+0−9=7>0⇒class 1 (outside).
Recall Solution 4.2
WHAT: the boundary between two classes is where their scores tie: zA=zB.
x−1=3−x⇒2x=4⇒x=2.
For x>2: zA>zB⇒ class A. For x<2: class B. The tie generalises "z=0" — with several classes the border is where two winning scores are equal, not where one score is zero.
Step 1 — line direction fixes w's direction. The line through (0,2) and (4,0) has equation 4x1+2x2=1⇒x1+2x2−4=0. So w∝(1,2) and b∝−4; write w=(c,2c),b=−4c.
Step 2 — the distance fixes the scale c. Signed distance of origin:
d(0,0)=c2+4c2c⋅0+2c⋅0−4c=5∣c∣−4c.
For c>0 this is 5c−4c=5−4≈−1.789 — wrong magnitude. We need d=−1, so rescale by the direction only. Set w=(a,2a), b=−4a and require length so distance =−1:
5a−4a=−1⇒5−4=−1?
That is fixed, so instead we must relax b's tie to the same scale is forced — the boundary line is fixed, so d(0,0) is a fixed geometric number=−4/5. Therefore a signed distance of exactly −1 for the origin is impossible for this line.
Mastery insight: the boundary line already pins the origin's true distance at −4/5≈−1.789; you cannot choose it. Sign (−, class 0) is achievable, magnitude is not. Answer: no such (w,b) exists; the consistent facts are w=(1,2),b=−4 giving d(0,0)=−4/5.
Recall Solution 5.2
Boundary at threshold t: σ(z)=t. Invert the monotone sigmoid:
1+e−z1=t⇒1+e−z=t1⇒e−z=t1−t⇒z=ln1−tt.
So w⊤x+b=ln1−tt, i.e. w⊤x+(b−ln1−tt)=0.
The coefficient vector w is untouched ⇒ same normal, same orientation; only the offset changed by −ln1−tt. At t=0.5, ln0.50.5=ln1=0, recovering z=0. ∎