Mental flexibility also called cognitive flexibility or mental state shifting is a cognitive process that allows us to effectively "switch" back and forth between several different tasks, stimulus properties, mental operations or strategies. Mental flexibility prevents us from fixating on one way of thinking, one solution to the problem and one perspective on the situation. To change perspectives, we need to inhibit our previous perspective and load into working memory a different perspective. It is in this sense that cognitive flexibility requires and builds on inhibitory control and working memory. Mental flexibility may be seen as the opposite of mental rigidity.
One of the most characteristic cognitive disorders in case of frontal lobe infringement is a tendency of the patients to use the same well learned response in a particular situation, although this reaction has long been known to be no longer adaptive. Issues with cognitive flexibility may manifest in child’s behavior, for example, when he seems to be very distressed by the sudden change in class activity. It is often less obvious that shifting is inherent in many academic tasks. For example, when writing a paragraph that is being dictated, a child must constantly shift from listening to writing and vice versa.