A data matrix is a type of 2D barcode consisting of black and white cell arrays with square or rectangular modules.
The length of the encoded data depends on the number of cells in the matrix. The data matrix can contain information from several bytes to 1556 bytes, alphanumerically up to 2335 characters.
Standard barcodes can hold a maximum of 20 digits of information. The data matrix has dozens or even hundreds of times more information than standard barcodes.
A single data matrix carries information horizontally and vertically and it does so by taking up one tenth of the standard bar code. Each data matrix has a timing pattern consisting of different combinations of black and white cells at 2 corners and L-shaped locator pattern in one corner. While the locator pattern is used to find and manipulate the code, the timing pattern specifies the number of columns and rows encoded in the symbol.
The data matrix is usually used to mark small items because the 2-3 mm² area can store up to 50 characters of information and the code is only read at 20% contrast ratio.
The reason why data matrix is preferred in medicine boxes is that they can be read with barcode reader and products can be followed up quickly.