A square loop of wire lies in the x, y plane with opposite corners at (0, 0) and (a, a). The loop carries a current I directed t
owards the origin along the y-axis and away from the origin along the x-axis. Calculate the cartesian components of the magnetic field B generated by the loop at the point (x, y, z) = (0, 0, a), in terms of a, I, and fundamental constants.
The magnitude of the magnetic field can be found by Biot-Savart Law. We should divide the loop into four components. Each component has a similar solution but their directions are quite different.
The directions can be found by right-hand rule. Point your index finger into the direction of current, point your middle finger towards the target point (0,0,a). Your thumb will show you the direction of magnetic field.