[Math] Does this operation exist? What’s its name

linear algebramath-softwarematrices

I need to do something like this

$$
\begin{bmatrix}
A \\
B \\
C \\
\end{bmatrix}
\begin{bmatrix}
x_1 & x_2 & \cdots & x_n \\
y_1 & y_2 & \cdots & y_n \\
z_1 & z_2 & \cdots & z_n \\
\end{bmatrix}
=
\begin{bmatrix}
A x_1 & A x_2 & \cdots & A x_n \\
B y_1 & B y_2 & \cdots & B y_n \\
C z_1 & C z_2 & \cdots & C z_n \\
\end{bmatrix}
$$

You get the idea.

I want to know if this operation already has a name, in order to see if my linear algebra library already supports it.

Best Answer

Note that your RHS can be obtained by matrix multiplication: $$ \begin{bmatrix}A&0&0\\0&B&0\\0&0&C\end{bmatrix} \begin{bmatrix} x_1&x_2&\cdots&x_n\\ y_1&y_2&\cdots&y_n\\ z_1&z_2&\cdots&z_n \end{bmatrix}. $$ The left matrix is a block matrix (in fact a block diagonal matrix). Your linear algebra library will likely have a way to construct these from an array of smaller matrices, and then you can use matrix multiplication.

Related Question