For three points to be collinear, the area of the triangle formed by them must be zero. The area of the triangle formed by points \( (x_1, y_1) \), \( (x_2, y_2) \), and \( (x_3, y_3) \) is given by the formula:
\[
\text{Area} = \frac{1}{2} \left| x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) \right|
\]
For collinearity, the area must be zero, so:
\[
0 = \left| x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) \right|
\]
Substitute the points \( (K, -1) \), \( (2, 1) \), and \( (4, 5) \):
\[
0 = \left| K(1 - 5) + 2(5 - (-1)) + 4((-1) - 1) \right|
\]
Simplify the terms:
\[
0 = \left| K(-4) + 2(6) + 4(-2) \right|
\]
\[
0 = \left| -4K + 12 - 8 \right|
\]
\[
0 = \left| -4K + 4 \right|
\]
\[
-4K + 4 = 0
\]
Solve for \( K \):
\[
-4K = -4 \quad \Rightarrow \quad K = 1
\]
Conclusion:
For the points to be on the same line, the value of \( K \) must be \( 1 \).