# Need help formatting some math

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{amsmath, amssymb, amsthm}
\usepackage[margin=1in]{geometry}
\usepackage{fancyhdr}
\usepackage{tcolorbox}
\usepackage{bm}
\setlength\parindent{0pt}
\pagestyle{fancy}
\fancyfoot{}
\fancyfoot[C]{\thepage}
\tcbuselibrary{most}
\renewcommand{\qedsymbol}{$\blacksquare$}

\def\R{\mathbb{R}}
\def\N{\mathbb{N}}
\def\Z{\mathbb{Z}}
\def\Q{\mathbb{Q}}
\def\C{\mathbb{C}}
\def\F{\mathbb{F}}
\def\P{\mathcal{P}}
\def\L{\mathcal{L}}
\def\M{\mathcal{M}}



I need the following but I don't know how to format this. (note there are two images) For the bottom image I have the following:

$\sum_{k = 1}^n A_{1,k}x_k = 0\\ \vdots \\ \sum_{k = 1}^n A_{m,k}x_k = 0$


But for the one on the top i got no clue. any help would be greatly appreciated. Thank you for your time

Used are mathtools and nicematrix package:

\documentclass{article}
\usepackage{mathtools}
\usepackage{nicematrix}

\begin{document}

$\mathcal{M}(T) = \begin{pNiceMatrix}[first-row,first-col] & v_1 & \dotsm & v_k & \dotsm & v_n \\ w_1 & & & A_{1,k} & & \\ \vdots & & & \vdots & & \\ w_1 & & & A_{m,k} & & \\ \end{pNiceMatrix}.$

\begin{align*}
\sum_{k = 1}^n A_{1,k}x_k   & = 0               \\
& \vdotswithin{=}   \\
\sum_{k = 1}^n A_{m,k}x_k   & = 0
\end{align*}
\end{document}