Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: mirror image of a square matrix

  • To: mathgroup at
  • Subject: [mg66347] Re: mirror image of a square matrix
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Wed, 10 May 2006 06:34:08 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <e3pean$ief$>
  • Sender: owner-wri-mathgroup at

ravi wrote:
> Let me define the mirror image of a matrix as the operation of flipping
> the columns such that the last column becomes the first, the second
> last becomes the second and so on. I would like to know if this can be
> done simpler than as follows:
> mat=Table[Random[],{n},{n}]
> matR=Transpose[Reverse[Transpose[mat]]]
> Are there any built in functions for operations like these?
> /ravi
Hi Ravi,

You can *Map* [1] the *Reverse* function onto the matrix. For example

m = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};

Reverse /@ m

{{3, 2, 1}, {6, 5, 4}, {9, 8, 7}}

Best regards,


  • Prev by Date: Re: mirror image of a square matrix
  • Next by Date: NDSolve system of partial eqn
  • Previous by thread: Re: mirror image of a square matrix
  • Next by thread: How to set up "Do" or "While" loops for several seperate commands