In a previous paper it has been shown by the author that a vectorial internal variable may give rise to dielectric relaxation phenomena and that if such a variable occurs the polarization P may be written in the form P = P(0) + P(1), where changes in P(0) are reversible processes and changes in P(1) are irreversible. In this paper we introduce a somewhat more general assumption concerning the entropy. This generalization leads to the possibility that both changes in P(0) and in P(1) are irreversible phenomena. In this way a formalism is obtained with two relaxation times for dielectric relaxation. In particular we investigate the linearized form of the theory. It is seen that in the linear case the relation between the electric field E and the polarization P has the form of a linear relation among E, P, the first derivatives with respect to time of E and P, and the second derivative with respect to time of P. Debye's equation for dielectric relaxation in polar liquids and the equation derived by De Groot and Mazur are special cases of the equation which has been obtained in this paper. Analogous results can be derived for magnetic relaxation phenomena. Snoek's equation and the equation obtained by De Groot and Mazur are special cases of the equation for magnetic relaxation which is derived in this paper.