Gradient LabSign up free

Home / GATE DA / 2025 / Q.55

GATE DA 2025, Q.55: Difference of squared distances to two means

Machine learningNearest-mean classifier2 marksMSQ (more than one correct)Free

The question

Classes red and green in ℝᵈ have means μ_red and μ_green. f(x) = ‖μ_red − x‖² − ‖μ_green − x‖²; label red if f(x) < 0, else green. Which are correct? (A) x = 0 is labelled green if ‖μ_red‖ < ‖μ_green‖. (B) f is linear in x. (C) f(x) = wᵀx + b with w, b depending on the means. (D) f is a quadratic polynomial in x.

Watch it solved

Solve it step by step

  1. Expand. The ‖x‖² terms cancel: f(x) = 2(μ_green − μ_red)ᵀx + ‖μ_red‖² − ‖μ_green‖².
  2. Linear. So f is linear (affine) in x: B and C; D fails.
  3. At 0. f(0) = ‖μ_red‖² − ‖μ_green‖² < 0 when ‖μ_red‖ < ‖μ_green‖, so 0 is red: A fails.

Answer: B, C

Official IIT Roorkee answer key: B; C.

Common mistake. Choosing D because the formula has squares; the quadratic parts cancel.

Remember. Nearest-mean with equal weights gives a linear boundary: the perpendicular bisector.

See it move

Learn the idea behind this question in the free animated lesson k-nearest neighbours, then Decision boundaries.

Want every question solved? The past-paper pack has all 195 questions from 2024, 2025 and 2026 for ₹499. The cheat sheet pack has 23 printable sheets for ₹399.

See the past-paper pack See the cheat sheets

Source: official GATE DA 2025 question paper and answer key (IIT Roorkee). The question is lightly reworded; every number and option is kept.