Message Boards Message Boards

0
|
8558 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Geometric interpretation of a matrix

Posted 10 years ago

Is it possible for me to enter a 2x2 or 3x3 matrix and return a geometric intepretation of said matrix e.g. reflection in plane with normal n etc.

POSTED BY: Oliver B
3 Replies

Are you looking for something that shows the geometry of the transformation? If so, how about this:

points = {{-1, -1}, {1, -1}, {1, 1}, {-1, 1}, {0, 0}, {0, 1}}
graphicsObjects = {Red, Polygon[{1, 2, 5}], Blue, 
  Polygon[{2, 3, 6, 5}] , Orange, Polygon[{6, 5, 1, 4}]}

g0 = Graphics[GraphicsComplex[points, graphicsObjects]]

MatrixForm[mirrorY = {{1, 0}, {0, -1}}]

mirrorY gets used in the rule-replace:

Graphics[GraphicsComplex[points /. {x_, y_} :>  mirrorY.{x, y}, 
  graphicsObjects]]

rotation45 = RotationMatrix[45 Degree]

Graphics[GraphicsComplex[points /. {x_, y_} :>  rotation45.{x, y}, 
  graphicsObjects]]

Rotate and then mirror:

Graphics[GraphicsComplex[
  points /. {x_, y_} :> mirrorY. rotation45.{x, y}, graphicsObjects]]

mirror across a different line:

g1 = Graphics[
  GraphicsComplex[points /. {x_, y_} :> mirrorY.{x, y - 1}, 
   graphicsObjects]]

Show original and mirror together

Show[g1, g0]

steps: enter image description here

POSTED BY: W. Craig Carter

Hi Oliver,

considering the general case I think it is a big exception if one can verbalize the meaning of a matrix like

e.g. reflection in plane with normal n

Valuable information about the matrix is always given by eigenvalues and eigenvectors.

Otherwise to get an idea what is going on you can simply plot the vector fields (e.g. in case of a rotation matrix):

mat2 = {{0, 1}, {-1, 0}};
VectorPlot[mat2.{x, y}, {x, -1, 1}, {y, -1, 1}]

mat3 = {{0, 1, 0}, {-1, 0, 0}, {0, 0, 1}};
VectorPlot3D[mat3.{x, y, z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]

Furthermore in the 2D case I find

StreamPlot[mat2.{x, y}, {x, -1, 1}, {y, -1, 1}]

quite nice and useful.

Cheers Henrik

POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract