You may not be as familiar with magnesium as you are with better-known minerals such as iron, calcium, and zinc. But magnesium is incredibly important for many of the body’s functions—it plays a key role in your immune system, nerves, and muscles, and helps keep your heart and bones strong. In all, magnesium is involved in more than 300 of the body’s biochemical reactions. But important as magnesium may be for keeping you healthy, U.S. Department of Agriculture dietary surveys show about half of all Americans are taking in less of it than they should.

Here, what you need to know about magnesium deficiency, including symptoms, causes, and risk factors. Plus, how to add more magnesium-rich foods in your diet.