Jump to content

Latex question

Featured Replies

Is there a way to use latex to make a matrix? And for that matter a determinant?

 

Thank you

inside the latex math environment

 

\left( \begin{array}{ccc} entry & entry &entry \\ entry & entry &entry \\ \end{array} \right)

 

would make a 3 column matrix with entries centred on in the column, Vary the 3 c's to make more columns. separate entries with & and \\ is a newline. ie the above would make a 2 row matrix. the command \left<symbol> makes a left bracket as big as the matrix. you can try varying <symbol>, to say, | to get a determinant.

  • Author
inside the latex math environment

 

\left( \begin{array}{ccc} entry & entry &entry \\ entry & entry &entry \\ \end{array} \right)

 

would make a 3 column matrix with entries centred on in the column' date=' Vary the 3 c's to make more columns. separate entries with & and \\ is a newline. ie the above would make a 2 row matrix. the command \left<symbol> makes a left bracket as big as the matrix. you can try varying <symbol>, to say, | to get a determinant.[/quote']

 

Here goes...

 

[math] A = \left( \begin{array}{cccc}

A_{11} \ A_{12} \ A_{13} \ A_{14}\\

A_{21} \ A_{22} \ A_{23} \ A_{24}\\

A_{31} \ A_{32} \ A_{33} \ A_{34}\\

\end{array} \right)

[/math]

 

[math] A \times B = \left| \begin{array}{ccc}

\hat i \ \ \ \hat j \ \ \ \hat k \ \ \\

A_x \ A_y \ A_z \ \\

B_x \ B_y \ B_z \ \\

\end{array} \right|

[/math]

 

Thank you Matt, I had a little trouble trying to center i^ j^ k^ in their respective colums, I know the backslash inserts a space, is there a better way to do that?

As Matt said

separate entries with &
and you will find that the entries will be aligned - in this case in the centre because of the c in \begin{array}{cccc}

 

Unfortunately there's a bug in the [math]\LaTeX[/math] implementation on the forum so it shows wrongly in

[math]A \times B = \left| \begin{array}{ccc}

\hat i & \hat j & \hat k \\

A_x & A_y & A_z \\

B_x & B_y & B_z \\

\end{array} \right|

[/math]

but in normal [math]\LaTeX[/math] use it will do what you wanted.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.