The perfect cadence with its falling fifth (or rising fourth) in the bass is the most characteristic succession of chords in the common practice tonal system. This progression from tonic to dominant ends the vast majority of tonal pieces, and is considered to be the cadence that produces the strongest feeling of closure, resolution and stability. It is probably because of this it is also felt to be the progression that most strongly establishes the sense being in a key, especially after a modulation.
At the end of a piece, section or phrase, both chords of a perfect cadence are most often in root position (as in the above example). However, V - I progressions often play an equally important role in defining a sense of key at any point in a phrase.
As is discussed in page that introduces the minor scale, the leading note is sharpened in the minor in order to mimic the voice-leading and harmony of the perfect cadence in the major, which is felt to be more final. The second of the two examples above has an added seventh and this intensifies the sense of resolution. V7 is known as the dominant seventh.
Both ordinary perfect cadences and those involving dominant sevenths are commonly found at the beginnning and middle of tonal phrases as well as at the end. The can be used in a variety of inversions, as in the examples below. The first example is from the opening of a movement - the key is established with a I - V - I progression in root position. In the second, the progression from a third inversion V7 to a first inversion I harmonises the beginning of a phrase in the middle of a piece.