For a quadratic equation ax^2 + bx + c = 0 to have equal roots, the discriminant D = b^2 - 4ac must be 0. Here, (-4)^2 - 4(1)(k) = 0 => 16 - 4k = 0 => k = 4.
For a quadratic equation to have equal roots, its discriminant, b^2 - 4ac, must equal zero. Substituting a = 1, b = -4, and c = k gives (-4)^2 - 4(1)(k) = 0. Solving 16 - 4k = 0 results in k = 4.