# ApCoCoA-1:NC.AdMatrix

 This article is about a function from ApCoCoA-1.

## NC.AdMatrix

Construct an adjacency matrix of the Ufnarovski graph for a finite set of words in a non-commutative polynomial ring.

### Syntax

```NC.AdMatrix(M:LIST):LIST
```

### Description

Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them.

Please set non-commutative polynomial ring (via the command Use) before calling this function. For more information, please check the relevant commands and functions.

• @param M: a LIST of words (or terms) in the defining ring. Note that each word is represented as a LIST, and that each element in the LIST involves only one indeterminate or none (a constant). For instance, the word x[2]y[1]x[2]^2 is represented as the LIST [x[2], y[1], x[2]^2].

• @return: a LIST consisting of two elements. The first element in the LIST is a LIST of words that are the vertices in the Ufnarovski graph of M, and the second element is an adjacency matrix of the Ufnarovski graph.

#### Example

```Use ZZ/(2)[x[1..3]];
M:=[[x[3]^3], [x[1], x[2]], [x[2]^2], [x[1]^2], [x[2], x[3], x[1]],
[x[1], x[3], x[1]], [x[1], x[3]^2], [x[2], x[3], x[2], x[3]], [x[1],
x[3], x[2], x[3]]];
NC.AdMatrix(M);

[[[x[3], x[2], x[1]], [x[3]^2, x[1]], [x[1], x[3], x[2]], [x[2], x[3], x[2]],
[x[3]^2, x[2]], [x[2], x[1], x[3]], [x[3], x[1], x[3]], [x[3], x[2], x[3]],
[x[2], x[3]^2]], Mat([
[0, 0, 0, 0, 0, 1, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 1, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 1, 0],
[0, 0, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 0, 0, 0, 0, 1],
[0, 1, 0, 0, 1, 0, 0, 0, 0]
])]
-------------------------------
```