Consideration was given to the problem of relative positioning with the use of alternating magnetic field. The problem was shown to be solvable using a system of three magnetic dipoles emitting magnetic field at different frequencies. Ambiguity of its solution was discussed, and ways to resolve it were proposed. An algorithm for relative positioning based on the solution of this problem was proposed. Error equations of the positioning algorithm and the results of their analysis were presented. Calibration procedures, improving accuracy of relative positioning, are also considered. One of these procedures, based on nonlinear optimization techniques, was presented in greater details. The paper was supplied with several numerical examples demonstrating effectiveness of proposed algorithms in relative positioning.