A secondary dominant is a borrowed chord V that creates a perfect cadence (V–I) onto a chord OTHER than the tonic.
For example, in C major, I might create a perfect cadence onto vi (A minor) by borrowing chord V from A minor.
The purpose of a secondary dominant is to emphasize the chord onto which it resolves.
In this example, Mozart borrows the dominant of D major to emphasise chord V in G major. In other words, the A dominant seventh chord (in first inversion with the C# in the bass) forms a V-I progression onto chord V, temporarily turning the chord V into a tonic. The secondary dominant here is labelled V of V as it is the dominant of V. Secondary dominants can be V of any chord (ii and vi are both common as well).
Mozart String Quartet K170
How to write a secondary dominant
- decide on the chord to which your secondary dominant will resolve (this chord will become a temporary tonic – it will be tonicised)
in this example we are in C major and I have chosen chord V (a G major chord) to tonicise
- find the note a fifth above (or fourth below) this temporary tonic (this will be the dominant of the chord being tonicised)
in this example a D is the dominant of G
- add any accidentals that you would need if you were in the key of the temporary tonic (it should be a major chord or a major triad plus minor seventh making a dominant seventh)
in this example the F needs to be sharpened to make a major triad
- you can use this chord in root position or first inversion – if you include a seventh it will usually resolve down by step