In the diagram shown, If the south-poles of two magnets stroke a steel bar, the…