Denominator of the function should not be zero.

$\therefore x^2 -5x + 4 \neq 0$

$x^2 – (4x + x) + 4 \neq 0$

$x^2-4x -x + 4\neq 0$

$x(x-4) – 1(x-4) \neq0$

$(x-1)(x-4)\neq 0$

$x \neq1, 4$

Therefore domain is set of all real numbers except 1 and 4.

$\therefore \text{domain} = R – \{1,4 \} $