Consider the following system of linear equations:
\[ \begin{cases} x + y + 5z = 3, \\ x + 2y + mz = 5, \\ x + 2y + 4z = k. \end{cases} \]
The system is consistent if
Step 1: Write the augmented matrix.
\[ \begin{bmatrix} 1 & 1 & 5 & | & 3 \\ 1 & 2 & m & | & 5 \\ 1 & 2 & 4 & | & k \end{bmatrix} \] Subtract the first row from the others: \[ \begin{bmatrix} 1 & 1 & 5 & | & 3 \\ 0 & 1 & m - 5 & | & 2 \\ 0 & 1 & -1 & | & k - 3 \end{bmatrix}. \] Subtract the second row from the third: \[ \begin{bmatrix} 1 & 1 & 5 & | & 3 \\ 0 & 1 & m - 5 & | & 2 \\ 0 & 0 & -m + 4 & | & k - 5 \end{bmatrix}. \]
Step 2: Condition for consistency.
For the system to be consistent, the last equation must not become contradictory. If \( m \neq 4 \), the third equation gives a valid value for \( z \). If \( m = 4 \), the coefficient of \( z \) vanishes, and we must have \( k - 5 = 0 \Rightarrow k = 5 \) for consistency. Thus, the system is consistent for all \( m \neq 4 \) and also for \( m = 4, k = 5 \).
Step 3: Simplify conclusion.
Hence, the general condition ensuring consistency is \( m \neq 4 \), except for one special case.
Final Answer: \[ \boxed{m \neq 4} \]