It's no secret that our brains are exceptionally flexible and can adapt to new situations. Whether it's a brain reusing parts of itself for surprising purposes, or helping someone live normally with only 10 percent of the brain undamaged, we've got a lot to thank brain plasticity for.

But neuroscientists haven't been sure of how precisely all this plasticity occurs in the brain. In particular, there's one giant problem: when some connections strengthen, neurons have to compensate somehow, or they'll get overwhelmed with input.

So how does it work? Researchers at the Picower Institute for Learning and Memory at MIT now think they have an answer.

What they've found is that when one connection (aka a synapse) becomes stronger, neighbouring synapses immediately weaken, to stop the neurons from being overwhelmed - and there's a special protein at play here.

"Collective behaviours of complex systems always have simple rules," says MIT neuroscientist and senior study author Mriganka Sur.

"When one synapse goes up, within 50 micrometres there is a decrease in the strength of other synapses."

The team invoked their own plasticity in the visual cortex neurons of mice by changing the neuron's "receptive field", or the particular patch of vision that neuron would be responsible for.

To do this, they zoomed in on one particular spine of a dendrite - the very tip of the neuron where the signal-receiving part of a synapse is located.

As they moved the visual target the mouse was looking at, they were able to adjust the receptive field of that neuron, and flashed a blue light inside the animal's visual cortex. In these particular genetically modified animals, the flashes activated the neuron, helping it strengthen that particular spine. 

And, as this reinforced spine grew, the nearby spines shrank - causing the relevant synapses to strengthen or weaken accordingly, thus demonstrating plasticity in action. 

"I think it's quite amazing that we are able to reprogram single neurons in the intact brain and witness in the living tissue the diversity of molecular mechanisms that allows these cells to integrate new functions through synaptic plasticity," said first author, neuroscientist Sami El-Boustani.

And that wasn't even all. The team then discovered that AMPA (α-amino-3-hydroxy-5-methyl-4-isoxazolepropionic acid) receptors were correlated with the weaking and strengthening of those synapses.

They used a specially made chemical tag that tracked the expression of the regulator of AMPA receptors, a protein called ARC, to determine what was causing the changes.

What they found was that synapses with less ARC protein were able to express more AMPA receptors, but increased ARC in neighbouring spines caused those synapses to express less.

"We think ARC maintains a balance of synaptic resources," says Jacque Pak Kan Ip, another neurologist and co-first author from MIT.

"If something goes up, something must go down. That's the major role of ARC."

While it's far from the first time researchers have looked into brain plasticity, these particular findings could help solve a problem that's been vexing neurologists for ages - and we now have a number of new tricks to help us study living brains.

The research has been published in Science.