(i) Express \(x^2 - 4x + 7\) in the form \((x + a)^2 + b\).
The function \(f\) is defined by \(f(x) = x^2 - 4x + 7\) for \(x < k\), where \(k\) is a constant.
(ii) State the largest value of \(k\) for which \(f\) is a decreasing function.
The value of \(k\) is now given to be 1.
(iii) Find an expression for \(f^{-1}(x)\) and state the domain of \(f^{-1}\).
(iv) The function \(g\) is defined by \(g(x) = \frac{2}{x-1}\) for \(x > 1\). Find an expression for \(gf(x)\) and state the range of \(gf\).