(a) A machine is a device by which we can either overcome a large resistive force (or load) at some point by applying a small force (or effort) at a convenient point and in a desired direction or by which we can obtain a gain in speed.
(b) The principle of an ideal machine is that the work output of the machine is equal to the work input.