From vector of polynomials to matrix multiplication

abstract-algebramatricesmatrix-calculuspolynomials

Imagine that I have two vectors of polynomials $\mathbf{v}, \mathbf{u}$ where $\mathbf{v} = (f_1, f_2, \dots, f_m)$ and $\mathbf{u} = (g_1, g_2, \dots, g_m)$ with $f_i,g_i \in\mathbb{Z}_q[x] / \langle x^n+1\rangle$ for $i \in [m]$. Recall that, when $n$ is a power of $2$, $\mathbb{Z}_q[x] / \langle x^n+1\rangle$ is the ring of polynomials with degree at most $n-1$ with coefficients from $\mathbb{Z}_q = \{0, 1, \dots, q-1\}$ for a prime $q$. Hence, each $f \in \mathbb{Z}_q[x] / \langle x^n+1\rangle$ has the form $$f = a_0 + a_1x + \dots + a_{n-1}x^{n-1}.$$

My objective is to perform the operation (I represent vectors as column vectors) $$\mathbf{u}^T \cdot \mathbf{v}= h\in \mathbb{Z}_q[x] / \langle x^n+1\rangle$$ but in matrix form, i.e., I would like to somehow represent these vectors as matrices with coefficients in $\mathbb{Z}_q$ such that their product gives a vector $\mathbf{h} = (h_0, h_1, \dots, h_{n-1}) \in \mathbb{Z}_q^n$ such that $$h = h_0 + h_1x + \dots + h_{n-1}x^{n-1}.$$ This is the natural embedding of vectors in polynomials and vice-versa.

I am not sure how to do it. Any help will be appreciated.

Best Answer

If $P$ denotes the permutation matrix $$ P = \pmatrix{&&&-1\\ 1\\ &\ddots \\ &&1}, $$ then the map to the circulant matrices defined by $f \mapsto f(P)$ is an isomorphism of rings. With that established, $u^Tv$ can be calculated with the block-matrix product $$ (u^Tv)(P) = \pmatrix{g_1(P) & \cdots & g_m(P)} \pmatrix{f_1(P) \\ \vdots \\ f_m(P)}. $$