# Ampère's Law

**Formula:**`B = μ0 × (I × ΣHi)`

## Introduction to Ampère's Law

Ampère's Law, named after French physicist André-Marie Ampère, relates the integrated magnetic field around a closed loop to the electric current passing through the loop. Mathematically, it is stated as the integral of magnetic field ** B** around closed loop = μ

_{0}times the electric current

**times the summation of magnetic field contributions**

*I***from the wires that penetrate the loop.**

*ΣHi*## Parameter usage:

`current`

= electric current passing through the loop (in amperes)`...pathThroughMagneticField`

= magnetic field contributions (in teslas) from sections of the path where the current is interacting with the magnetic field

## Example valid values:

`current`

= 5 (Ampères)`pathThroughMagneticField`

= 1, 2, 3 (Teslas)

## Output:

`magneticFieldSum × current`

= result expressed in terms of m(A∙T), where m is an arbitrary constant due to the lack of circumference in this simple representation of Ampère's Law.

## Data validation

The current must be greater than zero, as well as the values for the magnetic field contributions.

## Summary

This function calculates the combined effect of an electric current as it passes through a magnetic field, based on a simplified representation of Ampère's Law. It is not a complete depiction of Ampère's Law, which in reality also involves the path integral around a closed loop.

Tags: Physics, Electromagnetism, Amp Re S Law