What’s a linchpin?

I always assumed that a linchpin was something like the brooch that holds a cloak together at the chest or neck. Which kinda makes sense given the colloquial usage in which a linchpin is the thing that holds it all together — the sine qua non.

Image result for brooch cloak
I thought this was a linchpin. TIL it’s not.

But it turns out that a linchpin is something different.

A linchpin is the pin or metal rod that goes through the end of an axle to prevent the wheel from sliding off. Like this:

Image result for lynchpin