Visual walkthrough — Cyanides and isocyanides
This is the picture-first companion to the parent note. Read that for the summary; read this to understand why it is true.
Step 1 — Draw the two atoms and their electrons
WHAT: We line up one carbon and one nitrogen and share three pairs between them — a triple bond (three lines).
WHY: Three shared pairs is the sweet spot: it lets both atoms reach eight electrons around them (the "octet", the stable full shell), the way a full set of hands feels most comfortable. Fewer bonds would leave someone short.
PICTURE: Look at the figure. The three green lines are the three shared pairs. Carbon (lavender) sits left, nitrogen (coral) sits right. Count the dots and lines around each atom as we go.

- — the carbon starts with a lone pair drawn on its far side.
- — three bonds = six shared electrons sitting between the atoms.
- — the nitrogen keeps a lone pair on its far side.
Step 2 — The formal-charge scorecard (our referee)
WHAT: We run this scorecard on the bare unit.
WHY: Formal charge is our referee. It tells us which arrangement is neutral (comfortable) and which is charge-separated (strained but real). We will use it in every later step.
PICTURE: The figure shows each atom with its three numbers stacked: , , , and the result.

For the neutral with a lone pair on each:
- Carbon: , , .
- Nitrogen: , , .
That on carbon is the famous cyanide ion charge, . Carbon holds the extra electron — remember this, it is the whole plot.
Step 3 — Attach R to CARBON → the cyanide
WHAT: We let R bond to the carbon end. Carbon spends its lone pair to make the R–C bond.
WHY: When R bonds to carbon, carbon now uses all four of its bonds productively (one to R, three to N). Re-run the scorecard: carbon's drops from 2 to 0, so . Everyone is neutral and happy. This is the low-energy, "natural" product — a nitrile / cyanide .
PICTURE: The red arrow shows R clipping onto carbon; watch carbon's lone pair vanish into the new bond.

Both zero. No strain. Nitrogen keeps its lone pair pointing outward.
Step 4 — Attach R to NITROGEN → the isocyanide
WHAT: Now we force R onto the nitrogen end instead. Nitrogen spends its lone pair to make the R–N bond.
WHY: Re-run the referee. Nitrogen now has four bonds and no lone pair: . Carbon still keeps its lone pair: . The molecule is charge-separated but real — it is the only way to keep the triple bond and octets once R sits on N.
That terminal carbon with a lone pair and only two neighbours (-side via the triple bond, and its own lone pair) is divalent — a carbene-like, hungry, nucleophilic centre. That lone pair is the reactive, foul-smelling heart of the molecule.
PICTURE: The red arrow clips R onto nitrogen. Notice the appear on N and the plus lone pair remain on the terminal carbon.

Step 5 — Why KCN makes one and AgCN makes the other
WHAT: We choose the salt to choose the product. See Alkyl halides and SN2 substitution for the attack mechanism and HSAB principle for the soft/hard logic.
WHY:
- In KCN, the K–CN bond is ionic → floats free → its carbon (softer) attacks the soft carbon of R–X → R bonds to C → cyanide (Step 3).
- In AgCN, Ag–C is covalent → carbon's lone pair is caged by silver → only nitrogen's lone pair is free to attack → R bonds to N → isocyanide (Step 4).
PICTURE: Two panels — free attacking with its carbon (left), Ag-caged attacking with its nitrogen (right).

Step 6 — Pour water on each: trace the surviving bond
WHAT: Add water () to each molecule.
WHY & PICTURE: Follow the coloured bond that R keeps.
- Cyanide : R holds the carbon. That carbon picks up two oxygens and becomes ; nitrogen leaves as .
- Isocyanide : R holds the nitrogen. Nitrogen becomes an amine; the lonely external carbon grabs oxygens and leaves as formic acid .

See Carboxylic acids and Amines preparation and properties for the products' chemistry.
Step 7 — Feed each hydrogen: count who ends up on N
WHAT: Add 4 H (two ) to reduce the triple bond fully.
WHY & PICTURE: The R-bond survives again; count carbon groups on nitrogen.
- Cyanide: the triple-bond carbon becomes a between R and N. Nitrogen gains only that chain → one R-group → primary amine.
- Isocyanide: R already sits on N; the external carbon becomes a also on that same N → nitrogen now bears two carbon groups → secondary amine.

Step 8 — The degenerate check: what if R is not there?
If instead R bonded to both atoms at once, you'd break the triple bond (not enough electrons for three shared pairs plus two R-bonds) — so nature picks exactly one end, giving exactly two possible molecules. No third case exists.
The one-picture summary
One ion, two hands, two molecules, and everything downstream flows from which hand R shook.

Recall Feynman retelling — the whole walkthrough in plain words
Carbon and nitrogen are two kids gripping each other with three tight handshakes (the triple bond). Carbon is holding one extra marble — that's why the free ion has its minus sign on carbon. Now you (the big group R) walk up and grab one kid's spare hand.
- Grab carbon's hand → everyone's electron-count balances to zero, nice and calm → that's a cyanide. Silver-free KCN lets carbon reach out, so KCN makes this one.
- Grab nitrogen's hand → nitrogen runs out of spare electrons and goes , while carbon keeps a lonely pair and goes → strained, twitchy, and it stinks → that's an isocyanide. AgCN handcuffs carbon to silver, so only nitrogen is free to grab you — AgCN makes this one. Then the golden rule: whoever was holding your hand stays with you. Dunk them in water — the kid holding you keeps you (carbon → becomes an acid ; nitrogen → becomes an amine) and the other kid floats off (as ammonia, or as formic acid). Feed them hydrogen — same rule — and just count how many groups end up stuck on nitrogen: one group means a primary amine, two groups means a secondary amine. Every fact on the parent page is just this one story told again.
Recall Quick self-test
R is on carbon: what do you have? ::: A cyanide (nitrile), . Which salt cages carbon and forces N-attack? ::: AgCN (covalent Ag–C). Terminal carbon's formal charge in an isocyanide? ::: , with a lone pair, divalent. Reduce : primary or secondary amine, and why? ::: Secondary — N already holds R and gains a , so two groups on N. Hydrolyse : what carries R to the end? ::: The R–C bond survives, so R ends on the carbon (a carboxylic acid) + .