Major chords are comprised of at least 3 notes, the Root, which gives the chord it's name, the 3rd, and the 5th. For instance a C chord would look like this:
--0--
--1--
--0--
--2--
--3--
--X--
As you can see it contains 5 notes, not 3. It has a C being played 3rd fret 5th string, an E 2nd fret 4th string, a G open 3rd string, another C 1st fret, 2nd string, and another E open 1st string.
The C is the root, the E is the third, and the G is the fifth interval. Since you are probably wondering how I knew that, their is a pattern that goes like this:
whole, whole, half, whole, whole, whole, half.
This pattern will let you figure out what notes are in what key.
for example in the key of C, there are the following notes:
C D E F G A B C
D is a whole step above C, E is a Whole step above D, F is a Half step above E, ect... following the pattern above. And if you notice, C is the root, E is in the 3rd, and G is in the 5th, pretty simple once you understand the pattern of steps between notes.
Now lets look at an A chord
--0--
--2--
--2--
--2--
--0--
--X--
If you follow the pattern of steps above the key of A contains the following notes:
A B C# D E F# G# A
There is an A on open 5th string, an E 2nd fret, 4th string, an A 2nd fret 3rd string, a C# 2nd fret 2nd string, and an E open 1st string. A is the root, C# is the 3rd, and E is the 5th. However you may have noticed that the 5th interval is lower in pitch than the 3rd interval. On a guitar it dosen't matter what order the intervals are, as long as a chord contains the root, 3rd and 5th, it is still considered a chord.