Optimism is an attitude reflecting a belief or hope that the outcome of some specific endeavor, or outcomes in general, will be positive, favorable, and desirable. A common idiom used to illustrate optimism versus pessimism is a glass filled with water to the halfway point: an optimist is said to see the glass as half full, while a pessimist sees the glass as half empty.
Half a glass of water, illustration of two different mental attitudes, optimism (half full) and pessimism (half empty)
An optimist and a pessimist, Vladimir Makovsky, 1893
Pessimism is a mental attitude in which an undesirable outcome is anticipated from a given situation. Pessimists tend to focus on the negatives of life in general. A common question asked to test for pessimism is "Is the glass half empty or half full?"; in this situation, a pessimist is said to see the glass as half empty, or in extreme cases completely empty, while an optimist is said to see the glass as half full. Throughout history, the pessimistic disposition has had effects on all major areas of thinking.
An optimist and a pessimist, Vladimir Makovsky, 1893