This technique is almost certainly folklore, but I first saw it in Denis Firsov and Tarmo Uustalu's paper, which uses it to formalise and prove correct a regex matcher in Agda.
Running an NFA (N, \delta , I, F) on a word x_0x_1x_2\dots
from a starting set of states X is the same as the product of X (interpreted as a row vector) with each matrix for each symbol in the word:
\begin {array}{lcl}
\delta ^\ast (X, x_0x_1x_2\dots ) & = & X \cdot \delta (x_0) \cdot \delta (x_1) \cdot \delta (x_2) \cdot \cdots \\
\end {array}
Start from I and multiply F at last and the result will be [[ 1 ]] if the word is in the language and [[ 0 ]] otherwise:
w \in \mathcal {L} \;\;\Longleftrightarrow \;\; \delta ^\ast (I,w) \cdot F = [[ 1 ]]