### Basic Examples

Basic Examples

Give the antidiagonal elements of a matrix:

[{{a,b,c},{d,e,f},{g,h,i}}]

In[]:=

{c,e,g}

Out[]=

Give antidiagonals one element above and below the leading diagonal:

[{{a,b,c},{d,e,f},{g,h,i}},1]

In[]:=

{b,d}

Out[]=

[{{a,b,c},{d,e,f},{g,h,i}},-1]

In[]:=

{f,h}

Out[]=

Give an antidiagonal of a nonsquare matrix:

[{{1,2,3,4},{5,6,7,8},{9,10,11,12}}]

In[]:=

{4,7,10}

Out[]=

### Properties and Relations

Properties and Relations

Antidiagonal

m={{a,b,c},{d,e,f},{g,h,i}};

[m]==Reverse[Diagonal[Reverse[m]]]==Diagonal[Reverse[m,2]]

In[]:=

True

Out[]=

### Possible Issues

Possible Issues

If is too high or too low an empty list is returned:

k

[{{a,b,c},{d,e,f},{g,h,i}},3]

In[]:=

{}

Out[]=

### Neat Examples

Neat Examples

Rotate a matrix by 45 degrees:

RowColumn

[{{a,b,c},{d,e,f},{g,h,i}},#]&/@Range[2,-2,-1]

In[]:=

a |

b |

d |

c |

e |

g |

f |

h |

i |

Out[]=