Your dog knows when you're hapy and when you're mad just by looking at your face, new research has revealed.

While it's something dog owners have probably suspected for centuries, the discovery is the first evidence that canines can distinguish emotional expressions in another species.

To test whether the dogs could tell the difference between our expressions, researchers from the University of Veterinary Medicine Vienna in Austria showed dogs photos of just the upper or lower half of someone's face.

"We think the dogs in our study could have solved the task only by applying their knowledge of emotional expressions in humans to the unfamiliar pictures we presented to them," said one of the researchers, Corsin Müller, in a press release.

Scientists have previously tried to test whether dogs could read our expressions, but the results were always unconvincing. 

In the new study, the researchers trained dogs to tell the difference between photos of 15 people making either a happy or angry face. The pups were so good at it, that they were able to tell whether someone was happy or angry when looking at only half their face.

After training, they could even work out the difference in expressions when they looked at photos of people they'd never seen before.

In every case, the dogs were able to select the angry or happy face, depending on what they'd been directed, more often than would be expected by random chance. The results have now been published in Current Biology.

"Our study demonstrates that dogs can distinguish angry and happy expressions in humans, they can tell that these two expressions have different meanings, and they can do this not only for people they know well, but even for faces they have never seen before," said Ludwig Huber, the senior author of the study, in the release.

It's still not clear what the dogs think our different expressions mean, but in the study, the dogs were slower to learn to associate an angry face with a reward, which suggests they already were conditioned to stay away from someone who looks angry.

"It appears likely to us that the dogs associate a smiling face with a positive meaning and an angry facial expression with a negative meaning," said Huber in the release.  

The team is now planning to study more about how a dog's experience can affect their ability to recognise human emotions, and also how the emotions of an owner influences the emotions of their dog.

"We expect to gain important insights into the extraordinary bond between humans and one of their favorite pets, and into the emotional lives of animals in general," said Müller.