Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I was wondering if it's possible to colour the rows and columns of a matrix in mathematica.

I have received help from another forum and the code of my matrix is the following:

Rasterize@

Style[MatrixForm[{{n, -1 + n, -2 + n, \[CenterEllipsis], 1}, {2 n,

2 n - 1, 2 n - 2, \[CenterEllipsis], n + 1}, {3 n, 3 n - 1,

3 n - 2, \[CenterEllipsis],

2 n + 1}, {\[VerticalEllipsis], \[VerticalEllipsis], \

\[VerticalEllipsis], \[DescendingEllipsis], \[VerticalEllipsis]}, \

{n^2, -1 + n^2, -2 + n^2, \[CenterEllipsis],

HoldForm[(n - 1) n + 1]}},

TableAlignments -> {Center, Center}] // TraditionalForm, 30]

Thank you for your help.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica Is it possible to colour the rows or columns of a matrix?

Tags:

**Physics Forums | Science Articles, Homework Help, Discussion**