Hi Diane
There are two marriages showing in IGI for a James Matthew in 1872 Dundee, which one is your g grandfather?:
1. Spouse: MARY THOMSON Marriage: 12 APR 1872 Dundee, Angus, Scotland
2. Spouse: MARGRET ROSS Marriage:06 DEC 1872 Dundee, Angus, Scotland
There appears to be another couple in Dundee, a James Matthews and Margaret Stratton (various spellings of surname) who were having children around the same time:
1. MARGARET MATTHEW Birth: 13 SEP 1838 Dundee, Angus, Scotland
2. JOHN MATTHEW Birth: 21 SEP 1851 Christening: 14 OCT 1851 Dundee, Angus, Scotland
3. JAMES MATTHEW Birth: 04 JUL 1841 Christening: 04 JUL 1841 Dundee, Angus, Scotland
4. JESSIE MATTHEW Birth: 24 FEB 1854 Christening: 23 MAR 1854 Dundee, Angus, Scotland
5. ROBERT MATTHEW Birth: 22 AUG 1843 Christening: 22 AUG 1843 Dundee, Angus, Scotland
6. ELIZABETH WEBSTER MATTHEW Birth: 29 AUG 1847 Christening: 29 AUG 1847 Dundee, Angus, Scotland
7. MARY ANN MATTHEW Birth: 04 SEP 1849 Christening: 04 SEP 1849 Dundee, Angus, Scotland
8. PATRICK KINNEAR MATTHEW Birth: 15 SEP 1845 Dundee, Angus, Scotland
Now, a lot of these children's names match the 1871 Census entry you have been looking at. Given that the father James's occupation is also different to what you have on the 1872 marriage entry, I would say it's probable that you don't have your James yet in the 1871 Census.
Also, your GG grandmother Margaret died in 1877 at the age of 56, which also doesn't match the age of the Margaret in 1871 who is shown as age 59. A Margaret Matthew other name Stratton died in 1888 (birth year 1812) in the St Mary's district of Dundee.
There are 5 entries showing in Dundee for a James Mat*hew* aged 19-23. Have you looked at these?
Regards.
Monica