# Singular

##### 7.7.17.0. quantMat
Procedure from library `qmatrix.lib` (see qmatrix_lib).

Usage:
quantMat(n [, p]); n integer (n>1), p an optional integer

Return:
ring (of quantum matrices). If p is specified, the quantum parameter q
will be specialized at the p-th root of unity

Purpose:
compute the quantum matrix ring of order n

Note:
activate this ring with the "setring" command.
The usual representation of the variables in this quantum
algebra is not used because double indexes are not allowed
the rows of the usual matrix representation, that is, there
will be n*n variables (one for each entry an n*N generic matrix),
listed row-wise

Example:
 ```LIB "qmatrix.lib"; def r = quantMat(2); // generate O_q(M_2) at q generic setring r; r; ==> // characteristic : 0 ==> // 1 parameter : q ==> // minpoly : 0 ==> // number of vars : 4 ==> // block 1 : ordering Dp ==> // : names y(1) y(2) y(3) y(4) ==> // block 2 : ordering C ==> // noncommutative relations: ==> // y(2)y(1)=1/(q)*y(1)*y(2) ==> // y(3)y(1)=1/(q)*y(1)*y(3) ==> // y(4)y(1)=y(1)*y(4)+(-q^2+1)/(q)*y(2)*y(3) ==> // y(4)y(2)=1/(q)*y(2)*y(4) ==> // y(4)y(3)=1/(q)*y(3)*y(4) kill r; def r = quantMat(2,5); // generate O_q(M_2) at q^5=1 ==> // ** killing the basering for level 0 setring r; r; ==> // characteristic : 0 ==> // 1 parameter : q ==> // minpoly : (q^4+q^3+q^2+q+1) ==> // number of vars : 4 ==> // block 1 : ordering Dp ==> // : names y(1) y(2) y(3) y(4) ==> // block 2 : ordering C ==> // noncommutative relations: ==> // y(2)y(1)=(-q^3-q^2-q-1)*y(1)*y(2) ==> // y(3)y(1)=(-q^3-q^2-q-1)*y(1)*y(3) ==> // y(4)y(1)=y(1)*y(4)+(-q^3-q^2-2*q-1)*y(2)*y(3) ==> // y(4)y(2)=(-q^3-q^2-q-1)*y(2)*y(4) ==> // y(4)y(3)=(-q^3-q^2-q-1)*y(3)*y(4) ```