\input zb-basic \input zb-ioport \iteman{io-port 02163015} \itemau{Egecioglu, Omer; Ibarra, Oscar H.} \itemti{A matrix $q$-analogue of the Parikh map.} \itemso{Levy, Jean-Jacques (ed.) et al., Exploring new frontiers of theoretical informatics. IFIP 18th world computer congress, TC1 3rd international conference on theoretical computer science (TCS2004), 22--27 August 2004, Toulouse, France. Boston, MA: Kluwer Academic Publishers (ISBN 1-4020-8140-5/hbk). IFIP, International Federation for Information Processing 155, 125-138 (2004).} \itemab Summary: We introduce an extension of the Parikh mapping, called the Parikh $q$-matrix mapping, which takes its values in matrices with polynomial entries. The morphism constructed represents a word $w$ over a $k$-letter alphabet as a $k$-dimensional upper-triangular matrix with entries that are nonnegative integral polynomials in variable $q$. We show that by appropriately embedding the $k$-letter alphabet into the $(k+ 1)$-letter alphabet and putting $q= 1$ we obtain the extension of the Parikh mapping to $(k+ 1)$-dimensional (numerical) matrices introduced by {\it A. Mateescu}, {\it A. Salomaa}, {\it K. Salomaa} and {\it S. Yu} [Theor. Inform. Appl. 35, 551--564 (2001; Zbl 1005.68092)]. The Parikh $q$-matrix mapping, however, produces matrices that carry more information about $w$ than the numerical Parikh matrix. The entries of the $q$-matrix image of $w$ under this morphism is constructed by $q$-counting the number of occurrences of certain words as scattered subwords of $w$. \itemrv{~} \itemcc{} \itemut{scattered subword; injectivity} \itemli{} \end