Data Matrix is a two-dimensional matrix barcode with an L-shaped solid border on two sides and an alternating pattern on the other two, which together tell the scanner the symbol's size and orientation. It is built for density: a readable code can be a few millimetres square.
That makes it the standard for direct part marking and for regulated goods. Pharmaceutical packs, medical devices, electronic components and, increasingly, GS1 Digital Link identifiers on retail products all use Data Matrix because the symbol has to fit where nothing else would.
Error correction is fixed by the standard at a level that tolerates real damage, so codes etched into metal or printed on curved surfaces stay readable through their working life. On a phone screen the space saving matters much less, which is why a QR code is usually the better display choice.
Google Wallet renders Data Matrix on passes. Apple Wallet supports QR, PDF417, Aztec and Code 128, so a program standardising across both wallets normally uses a QR code. See QR and barcode identification for matching the format to the scanners in place.

