# Writing matrices with a variable name coverin some rows and some columns inside the matrix

]1

How can I write matrix equations like as shown in the picture? I need augmented matrix with vdots and a variable name inside the matrix which covers multiple rows and columns of the matrix.

Something like this?

\documentclass{article}
\usepackage{amsmath, array}
\begin{document}

$\setlength{\extrarowheight}{1pt} \setlength{\arrayrulewidth}{0.6pt} T_0 = \begin{bmatrix} \begin{array}{@{}c|c@{}} 10& \\[-0.8ex] \vdots & C_0 \\ 10 \end{array} \end{bmatrix} \;\text{ and }\; T_1 = \begin{bmatrix} \begin{array}{@{}c|c@{}} 10& \\[-0.8ex] \vdots & C_1 \\ 10 \end{array} \end{bmatrix}$

\end{document}


• It gave an error with beamer class. But deleting the setlength commands solved it. – Priyanka Gupta Apr 10 at 20:09
• Even \extrarowheight? – Bernard Apr 10 at 20:14
• yeah. I got '1pt' written as text after compilation. – Priyanka Gupta Apr 10 at 20:16

elementary simple code:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$T_0 = \left[\begin{array}{c|c} 10 & \\ \vdots & C^0 \\ 10 & \end{array}\right] \quad\text{and}\quad T_1 = \left[\begin{array}{c|c} 10 & \\ \vdots & C^1 \\ 10 & \end{array}\right]$
\end{document}


addedum: or more sophisticated code with use of the amsmath package:

\documentclass{article}
\usepackage{amsmath}             % math environments

\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]%
{\hskip -0.2\arraycolsep
\setlength\arraycolsep{1pt}
\let\@ifnextchar\new@ifnextchar
\array{#1}
}
\makeatother

\begin{document}
$T_0 = \begin{bmatrix}[c @{\ \vline\ } c] 10 & \\ \vdots & C^0 \\ 10 & \end{bmatrix} \quad\text{and}\quad T_1 = \begin{bmatrix}[c @{\ \vline\ } c] 10 & \\ \vdots & C^1 \\ 10 & \end{bmatrix}$
\end{document}