This is an important question.
The public perception is that lie detectors are often a bulletproof way of discovering the truth. However this is a mistaken view.
The basis and hypothesis of a lie detector is that anxiety measures such as galvanic skin responses or heart rate will inform the tester of a lie due to the presence of anxiety.
But one not think very hard to see the flaw in this plan.
Those who are innocent may feel anxious about being strapped down, with a variety of restraints and equipment that may induce a feeling of anxiety. This won't be helped by specific questions that they know will either condemn them or liberate them in the eyes of the tester.
Secondly - not all killers will exhibit anxiety at telling a lie. Psychopaths may lie freely and easily and so this would certainly not 'detect' lies.
That's why in usage I don't even refer to the machine as a lie detector byut a polygraph.
Scientific research continues to cast doubt on this method - https://antipolygraph.org/articles/article-018.shtml
@Daniel Sumner thank you, another topic the media doesn‘t portray right. I’ve always wondered because I am in a constant state of anxiety and so are so many others in this world, definitely not a good way to detect lies.