I am doing this test on musictheory.net https://www.musictheory.net/exercises/fretboard-chord and am trying to work out the chords but I am a bit stuck as to how to actually go about doing this. Do you have to actually know the notes first or can you tell what kind of chord it is just by looking at the intervals? My guess is that you should be able to tell just by looking at the intervals but then a lot of the chords shown are inverted so it becomes a bit harder. My question is: what is the definitive method used to figure out chord names just by looking at the intervals such as in the test in the link above?
You should be able to get the chord from the intervals and find a way to play it on guitar. If you see a root inversion then you will see a 3rd and a 5th relative to the root. Or you can see a major third followed by a minor third (the interval from 3rd to 5th). I am not sure of a "definitive" method but with experience identifying chords from the SMN notes gets easier. What you can do mentally is rearrange the notes (by octave displacement) until they are all in one octave then look for simple patterns. If there are repeated notes (or octaves) get rid of them in the analysis. For example the triads are fairly easy to identify:
The root inversion = (1, 3, 5) and looks like a Maj 3rd and a min 3rd, or relative to the lowest note a 3rd and a 5th
The first inversion is (3, 5, 8 (or 1)) and looks like a minor 3rd followed by a perfect 4th or a min 3rd and a min 6th relative to the lowest note (the 3rd).
The second inversion is (5, 1, 3) and looks like a perfect 4th followed by a Maj 3rd, or a 4th and a Maj 6th relative to the lowest note.
Once you start placing 7ths and other extensions the process get more involved. In the most basic form all chords are a stacking of thirds (1, 3, 5, 7, 9, 11, 13) which is just the major scale played every other note in 2 octaves. The same comments apply to minor (1, b3, 5), dim (1, b3, b5), and aug (1, 3, #5) triads.
One thing to watch out for is missing notes. It is quite common to drop the 5th from dominant seventh chords leaving one with (1, 3, b7, 8) rather than (1, 3, 5, b7). In such cases you will need to infer what the chord is with the loss of information. If the root is missing (which it sometimes is) you have your work cut out for you. In most cases that I've seen the root is in the chord but may not be the lowest note. A brute force trial and error method would involve looking at all permutations of the notes until you get a stack of thirds, then the lowest note is the root and the type of chord will become apparent.
I'm hard pushed to work out how useful an exercise this 'theory test' actually is.
However, intervals themselves are not, as you say, a lot of help. A major triad is made up from a M3 and a m3. As in C>E (M3), E>G (m3). Yes, I know it's really C>G making a P5, but in an inverted chord, especially on guitar, with maybe four notes, one of which may be duplicated, it's not easy to determine which is the root. So, major triad, M3 + m3. Minor triad, m3 + M3. So intervals don't help a lot here.
Knowing note names is one way to go. On guitar, it's nowhere near as simple as on piano, where each note is clear, and only one note lives in one position.
Once certain note names in certain places are known, it gets easier. The dots on the fingerboard can help, so start with third fret. Notes are G, C, F, Bb, D and G. 5th fret - A, D, G, C, E and A (all thick to thin strings).
Next problem for this test is 'is a particular note a sharp or a flat?' When attempting to spell a chord it helps a lot to use the appropriate names. If you work out a triad has F, A♯ and D♭ it's not a lot of help. How does one know it should be B♭ not A♯?
So, all that isn't helping with this test!
Chord shapes? Well, there are so many different ones that are available on a guitar, the common ones (E, A shapes, etc.) are well known, but bring all the others into the equation, and it's very confusing. Simple example - open C has 4 different shapes...
I suppose with this sort of exercise, playing the chord shown and recognising its sound is the best way - but then it's straying away from 'theory' into 'practical', isn't it?
The definitive way is to identify the notes and then construct the chord from the notes used.
If you don't know all the notes on the guitar learn at least the notes on the low E string. Guitars are tuned
E A D G B E. You can use the intervals to determine what the note is without counting up from the nut.
From E to A, A to D, D to G, B to E are perfect fourths. From G to B is a major third.
So for example, the notes on the 5th fret are
A D F# C E A
If you're close to the nut, it may be quicker to count the notes down from the fretboard. If you're up the neck it may be quicker to count the notes up from the low E string.
Ultimately, you'll want to drill on this so that you can identify any note on the fretboard. Then you won't have to memorize a zillion scale patterns.
You can also use chord shapes to identify chords but it's helpful still to know the notes. So for example, an open D chord shape on the 1-3 strings has the inversion 5 1 3 but if you don't know what B string note is on the 6th fret, you're kind of out of luck in terms of figuring out that you're looking at an F triad.
"Do you have to actually know the notes first or can you tell what kind of chord it is just by looking at the intervals?"
Yes, intervals. The problem is you have to accommodate the B (and E) strings because it's not a fourth higher than G so the fret distance per interval is different.
Please try the experiment of tuning in all-fourths... EADGCF ... and you will see instead of six chord shapes you will have one. Then you can see M3, m3, etc. without having to shift.
Standard tuning (eadgEB) is for open chords. Fine. But if you're doing something more theory driven then you need playing field that doesn't change.
Standard tuning is like playing baseball on a field where third base is moved fifty feet down the left field line.