The notion of duty stands in immediate relation to a law (even though I abstract from every end which is the matter of the law); as is shown by the formal principle of duty in the categorical imperative: "Act so that the maxims of thy action might become a universal law." But in ethics this is conceived as the law of thy own will, not of will in general, which might be that of others; for in the latter case it would give rise to a judicial duty which does not belong to the domain of ethics. In ethics, maxims are regarded as those subjective laws which merely have the specific character of universal legislation, which is only a negative principle (not to contradict a law in general). How, then, can there be further a law for the maxims of actions?
It is the notion of an end which is also a duty, a notion peculiar to ethics, that alone is the foundation of a law for the maxims of actions; by making the subjective end (that which every one has) subordinate to the objective end (that which every one ought to make his own). The imperative: "Thou shalt make this or that thy end (e. g., the happiness of others)" applies to the matter of the elective will (an object). Now since no free action is possible, without the agent having in view in it some end (as matter of his elective will), it follows that, if there is an end which is also a duty, the maxims of actions which are means to ends must contain only the condition of fitness for a possible universal legislation: on the other hand, the end which is also a duty can make it a law that we should have such a maxim, whilst for the maxim itself the possibility of agreeing with a universal legislation is sufficient.
For maxims of actions may be arbitrary, and are only limited by the condition of fitness for a universal legislation, which is the formal principle of actions. But a law abolishes the arbitrary character of actions, and is by this distinguished from recommendation (in which one only desires to know the best means to an end).