Let W be a random variable and X be a linear function of W: X = AW + B. Given a sample of independent observations distributed as X, we wish to find maximum likelihood estimators for the parameters A and B of the linear function. If the support of W is the whole real axis, the maximum likelihood estimators can be found by the usual methods; in other cases restricted maximization techniques must be used. Here we restrict attention to cases in which the support is the interval of numbers greater than or equal to a number a or the lattice which is the set of points of the form a + kh, k = 0,1,2,... and the density of W is decreasing over the support. Special attention is given to the exponential and geometric distributions. If the parameter of the distribution is also unknown, its maximum likelihood estimator can also be obtained when the support of W is the lattice.