What is the difference between dominant chord and dominant function? A dominant chord is the V or V7, and brings us back to the tonic. Function is the reason the dominant chord goes back to the tonic. When things that aren’t the dominant function as a dominant, that is a functional substitution. Dominant function includes other chords. A viio is the most simple example of a chord that shares dominant function with the V7, but we can have other chords that function as a dominant. A viio chord shares a dominant fuction with the V7, because it is the upper structure of a V7 chord.
Soprano: C5 - C5 - C5 - B4 - C5
Alto: E4 - E4 - F4 - G4 - E4
Tenor: G3 - A3 - A3 - B3 - G3
Bass: C3 - A2 - D3 - G2 - C3
Roman Numerals: I - vi - ii7 - V - I
Take the same example, and add a ii7 before the V7/V.
Soprano: C5 - C5 - C5 - C5 - B4 - C5
Alto: E4 - E4 - F4 - F#4 - G4 - E4
Tenor: G3 - A3 - A3 - A3 - B3 - G3
Bass: C3 - A2 - D3 - D3 - G2 - C3
Roman Numerals: I - vi - ii7 - V7/V - V - I
Now, turn the ii7 into a viio/V.
Secondary leading-tones create a viio that leads to the dominant. In C, the secondary dominant for V7/V is D7, and the secondary leading-tone is F#o. Where G is our dominant, D7 (V7/V) is the dominant to G, and F#o (viio/V) is the leading-tone to G.
Soprano: C5 - C5 - C5 - B4 - C5
Alto: E4 - E4 - F#4 - D4 - E4
Tenor: G3 - A3 - A3 - G3 - G3
Bass: C3 - A2 - A2 - G2 - C3
Roman Numerals: I - vi - viio/V - V - I
Soprano: C5 - C5 - C5 - B4 - C5
Alto: E4 - E4 - E4 - D4 - E4
Tenor: G3 - A3 - F#3 - G3 - G3
Bass: C3 - A2 - A2 - G2 - C3
Roman Numerals: I - vi - vii%7/V - V - I