On the basis of a linear complementarity, a mathematical formulation of thermo-mechanical contact with friction is presented. In this formulation, it is assumed that the thermal contact resistance is zero assuming a perfect contact. Thus there exists no discontinuity in the temperature distribution along the contact region. The concept of conventional contact surface which means prefect contact and prefect insulation along the potential contact surface is adopted. A complementarity condition between heat flow and temperature difference along the potential contact surface is then found. This thermal complementarity condition is, however, implicitly related to the mechanical one. The resulting linear complementarity with the additional constraints for the thermo-mechanical coupling is solved by a modified Lemke's algorithm when a gap and the corresponding temperature difference should both be basic or non-basic. Similarly a contact pressure and a heat flow can be basic only at the same time. Four numerical examples are presented to verify the numerical procedure and to illustrate the solution behaviors. The results of these examples are compared with those of ABAQUS. The first is a thermal Hertzian contact problem. In this example, there is little difference with the iso-thermal Herztian contact problem since the body can freely expand. The second example deals with a plate between two rigid surfaces. The thermal loading in this example is given by the temperature difference between the rigid surfaces and a very thin horizontal layer in the middle of the plate. As the magnitude of friction coefficients increases, the maximum contact pressure dramatically increases. The third example deals with a contact between two deformable bodies with initial gap. As the temperature difference between the two bodies increases, the hot body expands and starts to contact the cold one. In this example, according to the magnitude of the friction coefficient, the deformed profile of the potential contact surface is changed. The last example is motivated from an example of thermal rectification. An aluminum-stainless steel pair is used for the numerical analysis. When the heat flows from aluminum to stainless steel, the contact area becomes of a circular shape. However, in the reversed case, an annular shape of contact occurs. Depending on the direction of heat flow, the deformed configuration and the amount of heat flow is different from each other. The amount of heat flow from stainless steel to aluminum is about 133-160\% greater than the other case. These results show consistency with the experimental works done by other researchers. This shows that the difference in the contact configuration due to the difference in the expansion coefficient can explain at least partially the phenomenon of thermal rectification.