I have the following linear matrix equation in two variables, $\mathbf{X}$ and $y$: $$z = \mathbf{A}\colon\mathbf{X} + by$$ $$z = \sum_i^3\sum_j^3\mathbf{A}_{ij} \mathbf{X}_{ij} + by$$ where $z$, $b$ and $y$ are scalar, $\mathbf{A}$ and $\mathbf{X}$ are 3x3 matrices. With a series of $z$$(\mathbf{X},y)$, is there any way to calculate $\mathbf{A}$ and $b$?
I can calculate $z$ using the method which this equation is supposed to approximate, but which and how many $z(\mathbf{X},y)$ would be needed to figure out the linear approximation?
Context: this is for calculating the coupling between an imposed, far-field stress $\sigma^0_{ij} = \mathbf{X}_{ij}$ and a local shear stress $\sigma^1_{12} = z$, with a parameter related to geometry, $y$.
Attempts: Owing to the symmetry of $\sigma^0_{ij}$, I am able to represent the 3x3 matrices, $\mathbf{X}$, as 1x6 vectors, $\mathbf{x}$. I can solve the case where $b = 0$ by choosing 6 $\mathbf{x}$ such that $\mathbf{M} = [\mathbf{x_1~x_2~\dots~x_6}] = c\mathbf{I}$. Where $c$ is a scalar. Then: $$\mathbf{A} = \mathbf{M}^{-1}\begin{bmatrix} z(\mathbf{x}_1) \\ z(\mathbf{x}_2) \\ \vdots \\ z(\mathbf{x}_6) \end{bmatrix}$$ However $b$ should not be 0 so this solution isn't quite what I need.