Do I need hyphens? Should I use the indefinite article or zero article?
It is incorrect to write "a 5-mm-thick layer". Rather, it should be written:
5 mm-thick is a compound adjective formed from the adjectives 5 mm and thick, and it modifies layer. Consider:
Note that as a compound adjective in its own right, 5-mm/five-millimeter is hyphenated. When compounded again, though, the first hyphen is dropped: 5 mm-long/five millimeter-wide, etc.
Other similar compound adjectives can be found in contexts similar to the following:
Review this article for more on compound adjectives.
I would have said that there is no need for a hyphen between 5 and mm; 5mm is normally written thus.
So it would be:
To answer the question directly: yes, it is perfectly correct to write “a 5-mm-thick layer”. However, when not in prefix position, it would be “a layer that’s 5 mm thick”, this time without any hyphens.
The accepted answer appears to be wrong in its assertion that there is something wrong with writing “a five-millimeter-thick layer”. There isn’t.
Here are actual examples:
I believe that should establish the “correctness” of the fully hyphenated form. Certainly it occurs with plenty of frequency in written English, although I cannot speak to non-English usage.