What does it mean when a guy puts his hand on your knee?

EmmaHearts
Okay, so I was at this dance and it was dark and I was sitting by my boyfriend (actually he hasn't made it official, but our relationship is the same as a boyfriend and gf), and all of a sudden he just put his hand on my knee and was gently rubbing his thumb up and down. And I didn't know what to do so after 3 minutes I put my hand on his and he held my hand and then rubbed my knee with the other hand! What does this mean? And why do guys do it?
What does it mean when a guy puts his hand on your knee?
2 Opinion