6

Adding this as an additional answer. You could use the multirow package with this code: \documentclass{article} \usepackage{amsmath,newpxtext,newpxmath,multirow} \begin{document} \[ i\ \overset{\textstyle{j}}{\left(\begin{array}{ccccc} a_{11} & \cdots & \multirow{2}{*}{\rule[-4ex]{.5pt}{5.5ex}} & \cdots & a_{1n}\\ \vdots & & & ...


5

With nicematrix you get the desired spacing by setting \arraycolsep. And a friendlier syntax, by the way. \documentclass{article} \usepackage{amsmath} \usepackage{nicematrix} \begin{document} \[ \setlength{\arraycolsep}{20pt} \begin{bNiceMatrix}[first-row,first-col] & a & b \\ a & 0 & 1 \\ b & 2 & 3 \end{bNiceMatrix} \] \end{...


5

No need for blkarray for such a simple case, an easier option is to concatenate two arrays side-by-side. The left array can be a pmatrix to automatically get the round parens. \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \[ \begin{pmatrix} A & B \\ C & D \end{pmatrix} % \begin{array}{c} \text{text one}\\ \text{text two} \...


4

Is this what you have in mind? \[ i\overset{\textstyle{j}}{\begin{pmatrix} a_{11} & \cdots & & \cdots & a_{1n}\\ \vdots & & \vdots & & \vdots\\ & \cdots & a_{ij} & \cdots & \\ \vdots & & \vdots & & \vdots\\ a_{n1} & \cdots & & \cdots & a_{nn} \end{pmatrix}} \] You could ...


4

Same as others, I'm not sure what you really want to reduce, but my idea is you may be able to divide the big matrix into four small matrices. Along the diagonal, you have matrix T and upper right and bottom left corners have 4x4 all zero matrices. \documentclass{article} \usepackage{mathtools} \usepackage{blkarray, bigstrut} % \begin{document} \[ \...


4

No idea why, but it uses \BA@colsep so you need to access the command with @ in its name. \documentclass{article} \usepackage{blkarray} \begin{document} \[\makeatletter\setlength\BA@colsep{53.4pt}\makeatother \begin{blockarray}{c c c} & a & b \\ \begin{block}{c[c @{\hspace{50pt}} c]} a & 0 & 1 \\ b & 2 & ...


4

Here is an option: \documentclass{article} \usepackage{blkarray} \begin{document} \[ \begin{blockarray}{c c @{\hspace{50pt}} c} & a & b \\ \begin{block}{c[c @{\hspace{50pt}} c]} a & 0 & 1 \\ b & 2 & 3 \\ \end{block} \end{blockarray} \] \end{document}


3

You may reduce the intercolumn space, which blkarray decides in a different way than for array. \documentclass{article} \usepackage{mathtools} \usepackage{blkarray, bigstrut} % \begin{document} \begin{equation*} \addtolength{\csname BA@colsep\endcsname}{-4pt} \mathbf{S}= \begin{blockarray}{*{10}{c} l} \begin{block}{*{10}{>{$\footnotesize}c<{$}} l} ...


3

with tikz ... \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds, fit, matrix} \begin{document} \begin{equation} \begin{tikzpicture}[baseline, every label/.append style={label distance=6pt, inner sep=0pt} ] \matrix (m) [matrix of nodes, nodes={minimum width=2em, minimum height=3ex, ...


3

Here is a simple solution with booktabs, a pmatrix environment and one more column: \documentclass{article} \usepackage{mathtools, blkarray, newpxtext, newpxmath} \usepackage{booktabs} \begin{document} \[ \begin{aligned} \MoveEqLeft[4.6]\scriptstyle j \\[-0.5ex] \raisebox{0.4ex}{$\scriptstyle i $~}\begin{pmatrix} \!\!\begin{blockarray}{lr@{}...


3

There's no interaction with the vertical lines if you locally remove the padding of booktabs rules, which depend on the values of \aboverulesep (default: 0.605mm or 0.4ex) and \belowrulesep{<width>} (default: 0.984mm or 0.65ex) : \documentclass[11pt]{article} \usepackage{lmodern} \usepackage{blkarray, bigstrut} \usepackage{booktabs} \begin{document} ...


3

You can use the Left{text}{delimiter} feature of blkarray, if there's nothing else on the line. Or you can use a plain pmatrix followed by a tabular. Note both solutions are centred differently: \documentclass{article} \usepackage{amsmath} \usepackage{blkarray} \begin{document} \[\begin{blockarray}{\Left{$ M ={} $}{(}cc)l} A & B & \text{text ...


3

Here I use a not-often-used feature of the tabstackengine package that allows the mode of stacks to be different than that of TABstacks. So I make the defaults stacks in "text" mode and TABstacks in "math" mode. Then I can avoid the need to apply \text{} to the text. \documentclass[12pt]{article} \usepackage{amsmath,tabstackengine} \setstacktabbedgap{1....


2

I would stick with the array environment, possibly enirched by multirow and bigdelim. It's a bit of a pain to mess around with spaces, but I posted an example to prove how to do it. The details are in multirow documentation \documentclass{article} \usepackage{amsmath,mathtools,multirow,bigdelim} \begin{document} \[ \begin{array}{ccc@{\,}lc} \ldelim( {2}{...


2

I propose this solution, with smaller labels and a width equal to the width of –1: \documentclass{article} \usepackage{blkarray} \usepackage{amsmath, bm, amssymb} \usepackage{makebox, bigstrut, relsize} \begin{document} \begin{equation} \setlength{\arraycolsep}{3pt} \bm{\widetilde{T}}_{(2,1)} = \begin{blockarray}{*{8}{c}} \mathsmaller{1} & \...


2

Thanks to @Zarko pointing out that the way to do multicolumns when using blockarray is to use \BAmulticolumn instead of \multicolumn. The final result is from the following code: \documentclass{beamer} \usepackage{blkarray} \usepackage{multirow} \begin{document} \begin{frame} \begin{blockarray}{ccccccc} & \BAmulticolumn{5}{c}{\text{Predicted}} &...


2

Since you don't say exactly what it is that you want to be reduced and what not, I'm just guessing that you want the matrix itself to be smaller. (I haven't changed any of your other code, just added \footnotesize around the matrix.) \documentclass{article} \usepackage{mathtools} \usepackage{blkarray, bigstrut} % \begin{document} \begin{equation*} \mathbf{...


2

blkarray is so weird.... \documentclass{article} \usepackage{blkarray} \addtolength\textwidth{25pt} \begin{document} \[ \left[ \begin{blockarray}{ccccccc} \begin{block}{[ccc]cccc} I_p \\ & \ddots \\ & & I_p \\ \end{block} \begin{block}{c[ccc]ccc} & I_p \\ & & \ddots \\ & & &...


2

The separating length is \BA@colsep, and by default, it is equal to tabcolsep. I defined a new command to change it: \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{blkarray} \makeatletter \newcommand{\setBAcolsep}[1]{\BA@colsep=#1} \makeatother \begin{document} \[ \small\setBAcolsep{53.4pt} \begin{blockarray}{*{3}{c}} ...


2

You can use the bigstrut package: \documentclass[11pt, a4paper]{IEEEtran} \usepackage{amsmath} \usepackage{amssymb, amsfonts} \renewcommand{\arraystretch}{1.2} \usepackage{blkarray} \usepackage{bigstrut} \begin{document} \setlength{\bigstrutjot}{1ex} \begin{blockarray}{r c c c c} & A & B & C & D \\ \begin{block}{r [>{\...


2

It is simple with pstricks: you define the opposite vertices of a frame as empty nodes (\pnode command) at the relevant places in the matrix and use the \psframe command. I also added some improvements to your matrix: \documentclass[svgnames]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amssymb} \usepackage{blkarray, array, ...


1

Here is is workaround, with \useshortskip from nccmath for the above spacing, and a simplle \vskip -2ex for the space below: \documentclass{article} \usepackage{blkarray} \usepackage{amsmath, nccmath} \setlength{\parindent}{0pt} \newcommand{\colVectorLabelled}[2]{ \ensuremath{\mathrm{#1} = \begin{blockarray}{*{1}{c} l} \begin{block}{*{1}{>{$\...


1

Here another proposal using kbordermatrix package: \documentclass[a4paper,12pt]{article} \usepackage{mathtools} \usepackage{kbordermatrix} \begin{document} \[ \kbordermatrix{ & \text{\small A} & \text{\small B} & \text{\small C} & \text{\small D} \cr \text{\small A} & 245 & 321 & 572 & 214 \cr \text{\small B} & 574 &...


1

as supplement to interesting @Sebastiano answer (+1): \documentclass{article} \usepackage{bm} \usepackage{amsmath} % for \dotsm \usepackage{nicematrix} \begin{document} \[ \NiceMatrixOptions{code-for-first-row = \scriptstyle\color{blue}} \bm{\widetilde{T}}_{(2,1)} = \begin{pNiceArrayRC}{>{\rule[-0.2ex]{0pt}{2.4ex}}CCCCCCCC} 1 & 2 ...


1

My another proposal is this MWE with the option nicematrix. \documentclass{article} \usepackage{mathtools,nicematrix,bm} \begin{document} \[\bm{\widetilde{T}}_{(2,1)} =\begin{pNiceArrayRC}{CCCCCCCC}[columns-width = .5cm] {\scriptstyle1}& {\scriptstyle2} & & {\scriptstyle N-1} & {\scriptstyle N} & {\scriptstyle N+1} & & {\...


1

An option based on these examples: Highlight elements in the matrix in tikz, colored upper triangular matrix. RESULT: MWE: \documentclass[tikz,border=14pt]{standalone} \usepackage{tikz} \usetikzlibrary{matrix,shapes,decorations.pathreplacing,fit,backgrounds} \begin{document} \begin{tikzpicture}[ %Global config Highlight/.style={ ...


1

You can do it with blkarray; the only needed tricks are \BAmulticolumn and a definition for a filling rule higher than \hrulefill. I defined the height the same as the fraction bar. \documentclass{article} \usepackage{amsmath,blkarray,newpxtext,newpxmath} \newcommand{\highhrulefill}{% \leavevmode \leaders\hrule height \dimexpr\fontdimen22\textfont2+0....


1

Not a surprise, I'm afraid: blkarray uses several tricks that end up using a bounding box that's not necessarily the expected one. \documentclass{article} \usepackage{blkarray} \begin{document} \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{0.1pt} X$\begin{blockarray}{[c]c} 0 & \scriptstyle m_1 \end{blockarray}$X X\fbox{$\begin{blockarray}{[c]c} 0 &...


1

The delimiters \[...\] do not produce a horizontal-mode quantity that can be operated upon by \resizebox. Thus, change your \[ and \] delimiters to $ and $. Shown with showframe. \documentclass{memoir} \usepackage{blkarray} \usepackage{graphicx} \usepackage[pass,showframe]{geometry} \begin{document} \begin{table}[tbp] \caption{Lore ipsum} \resizebox{\...


Only top voted, non community-wiki answers of a minimum length are eligible