Function Repository Resource:

# MatrixFormDivided

Add row and column dividing lines to MatrixForm

Contributed by: Gustavo Delfino
 ResourceFunction["MatrixFormDivided"][m,step] returns a MatrixForm of matrix m with divider lines every step columns and rows. ResourceFunction["MatrixFormDivided"][m,{xstep,ystep}] use different step specifications for colums and rows. ResourceFunction["MatrixFormDivided"][m,{{s1,s2,…,sn}}] uses divider lines with specified sizes s where each si represents a number of columns and rows. ResourceFunction["MatrixFormDivided"][m,{{sx1,sx2,…,sxn},{sy1,sy2,…,syn}}] uses diferent divider lines specific spacings for rows and columns. ResourceFunction["MatrixFormDivided"][spec] represents an operator form of ResourceFunction["MatrixFormDivided"] that can be applied to a matrix.

## Details and Options

ResourceFunction["MatrixFormDivided"] takes the option "DividersOffset", which specifies the offset used for the dividers. This can be an integer or a list of two integers representing different row and column offsets.

## Examples

### Basic Examples (3)

Place divider lines at every second column and row:

 In[1]:=
 Out[1]=

Place divider lines at every third column and row:

 In[2]:=
 Out[2]=

Use the operator form on a rectangular matrix:

 In[3]:=
 Out[3]=
 In[4]:=
 Out[4]=

Using copy/paste or evaluate in place, it is possible to use MatrixFormDivided as part of input. This cannot be done with a Grid:

 In[5]:=
 Out[5]=

### Scope (3)

The structure of composed matrices can be highlighted by using divider lines:

 In[6]:=
 Out[7]=
 In[8]:=
 Out[8]=

Use dividers at specific locations:

 In[9]:=
 Out[9]=

Use dividers at specific locations differently for rows and columns:

 In[10]:=
 Out[10]=

### Options (3)

#### DividersOffset (3)

Place dividers for every two rows or columns, with an offset of one:

 In[11]:=
 Out[11]=

Use an offset of one only on the rows:

 In[12]:=
 Out[12]=

Use an offset of one only on the columns:

 In[13]:=
 Out[13]=

### Properties and Relations (1)

MatrixFormDivided is an extended version of MatrixForm:

 In[14]:=
 Out[14]=
 In[15]:=
 Out[15]=

### Possible Issues (2)

The output of MatrixFormDivided is not directly computable:

 In[16]:=
 Out[16]=

By evaluating it in place, it becomes computable:

 In[17]:=
 Out[17]=

The "DividersOffset" option has no effect when using specific spacings:

 In[18]:=
 Out[18]=

GustavoDelfino

## Version History

• 1.0.0 – 11 July 2022