when do you need to use the octet rule for lewis structures and when does it not apply

i am confused for N2O4

i cant get the rules to work with the structure

My general rule is that one ALWAYS tries to make the octet rule work EXCEPT in a limited number of cases.

i)uneven number of electrons which certainly precludes the octet rule.
ii)elements such as H that can have only two electrons.
iii) elements such as B and Be (many compounds of B have just six electrons and many compounds of Be have just four electrons.) I will try to find an electron dot structure on the web. I shall post it if I can find one.

The number of valence electrons in the entire molecule is 2x5 for the two nitrogen atoms and 4x6 for the four oxygen atoms.

Total # of valence electrons=2x5+4x6=34 electrons or 17 electron pairs. We link the two N's together by a double bond (two shared electron pairs). Each N is linked to two O's by single bonds. So far each N has four electrons pairs around it. If we place three unshared electron pairs on each O, we have used up 34 electrons and all atoms have an octet.
Why doing all this? Because it works: We have used the correct number of valence electrons in linking the six atoms, and every atom is surrounded by an octet. The primary rules are counting the valence electrons correctly, and placing four electron pairs (shared and unshared) around each atom. Exceptions to the Octet Rule are rare. It would take too long to describe and explain them here.

Can I not count? I count 36 that way.

The octet rule is a guideline used in creating Lewis structures to determine the number of valence electrons that an atom can have in its outer shell. According to the octet rule, atoms tend to gain, lose, or share electrons to achieve a stable electron configuration of eight electrons in their outermost shell (except for hydrogen and helium, which only require two electrons).

In the case of N2O4, the octet rule does not apply directly to the central nitrogen (N) atoms. Let's go through the steps to determine the Lewis structure for N2O4:

1. Count the total number of valence electrons:
For N2O4, sum the valence electrons of each atom:
(2 x N) + (4 x O) = 2(5) + 4(6) = 10 + 24 = 34

2. Determine the central atom:
In N2O4, there are two nitrogen atoms (N) and four oxygen atoms (O). Since nitrogen is less electronegative than oxygen, it is likely to serve as the central atom.

3. Create a skeleton structure:
Place the central atom (N) in the middle and connect it to the surrounding atoms (O) using single bonds:
O-N-O

4. Distribute the remaining electrons:
Subtract the total number of electrons in step 1 from the skeleton structure:
34 - 6 (for the three bonds) = 28 electrons remaining.

5. Distribute the remaining electrons around the atoms:
Distribute the remaining electrons onto the outer atoms (O) and around the central atom (N), while following the octet rule for those atoms. Start with the outer atoms before moving to the central atom:
Each O atom has six electrons (remember oxygen can exceed the octet) and each N atom will have nine electrons remaining. Place the remaining electrons on the central N atom.

After positioning the remaining electrons, the structure should look like this:
O-N-O
| |
O O
Each oxygen atom now has six electrons (including the bonding pair) and each nitrogen atom has nine electrons (including the bonding pairs) except for the remaining electrons.

6. Complete the octets (duets for hydrogen):
In the case of N2O4, since nitrogen can exceed the octet rule, we have achieved a stable Lewis structure where the outer atoms have satisfied the octet rule. The remaining electrons should be placed on the central nitrogen atom to complete its valence electrons.

The final Lewis structure for N2O4 is:
O-N-O
| |
O O

I hope this explanation helps you understand how to approach the Lewis structure for N2O4 and when the octet rule applies.