When I am by myself, I pretty much know how I am going to react to anything.
When I'm with one or two people I know fairly well, I can make strong assumptions about how they are going to act and react.
If those one or two people are people I don't know well, I can't really know how they are going to react. I can make guesses based on my lifetime of general human behavior, but individuals often go outside of general behavior. Here is where I start getting uncomfortable.
The more people there are, the harder it is for me to figure out exactly what sort of reaction they will have, in part because I can't know everyone very well and in part because people in large groups don't always react the same as they would by themselves or in a smaller group. I start getting nervous and feeling very uncomfortable at this point because there is no way for me to predict anything. I might be able to make educated guesses based on the situation, but people at a movie theater usually stay in their seats for the entire movie, people at a fair or a party are pretty much allowed to do as they please.
Similarly, I rarely feel alone when I'm by myself. I'm there and I communicate with myself fairly well and I don't ever have to try and interpret nonverbal cues.
With one or two people who I know I also rarely feel alone. These are people who I've been around enough that I understand most of their nonverbal cues, often instinctually, and since I'm not uncomfortable around them I'm also a talker and will ask if I'm confused.
When those two people are people I don't know I sometimes feel alone. I don't talk much around people I don't know. I often can't force my voice out of my throat. I'll just stand there. If there's no talking I have to try to make an educated guess at their nonverbal cues. Sure, I've got the smile and frown thing down and I'm okay with detecting how those expressions change when the eyebrows are up or down or furrowed, but what about the one hand in the pocket and the other across the stomach? What does that mean?
Add more and more people and the noises and the motions increase and start getting muddled together. The person behind me telling and laughing at a racist joke doesn't match the person hunched over with arms across their chest in front of me doesn't match slowly getting louder argument to the left doesn't match the person strutting across my line of sight doesn't match a million other things going on in the room. Here is where I start to feel alone and lonely, surrounded by all these people.
Worse is when I see a group of two or three talking and laughing, enjoying themselves. Here is where the loneliness becomes a stomach pang as well as emotionally crippling. It hurts because that's my comfort zone I see, but I don't have it and can't have it because I'm either there by myself or I the people I came with have scattered because they are fine in a crowd and hovering on the outside of their conversations is just as lonely as if they weren't there to begin with.
Those times I am out with one or two people I know and we stick together, I don't get lonely. I suppose it's because I have what I need a unit I basically understand.