
答え1
この行列積のコーディングは非常に簡単です。インデックス付き変数を使用して式を構成する 4 つの行列を記述するだけです。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
\begin{equation*}
\begin{pmatrix}
y_1 \\
\vdots \\
y_n
\end{pmatrix}=
\begin{pmatrix}
1 & x_{12} & \ldots & x_{1k} \\
\vdots & \vdots & \ddots & \vdots \\
1 & x_{N2} & \ldots & x_{Nk}
\end{pmatrix}
\begin{pmatrix}
\beta_1 \\
\vdots \\
\beta_k
\end{pmatrix}
+
\begin{pmatrix}
u_1 \\
\vdots \\
u_k
\end{pmatrix}
\end{equation*}
% <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
\end{document}