A linear transformation in 3D can be represented by a 3 by 3 matrix. If you know, for example, that the point (x, y, z) in one coordinate system is mapped into (p, q, r) in the other, you know that

so you have the three linear equations, ax+ by+ cz= p, dx+ ey+ fz= q, and gx+ hy+ iz= r. Two more points would give 6 more equations so you need only three points to get 9 linear equations in the 9 components, a, b, c, d, e, f, g, h, and i.