Johnny5 Posted March 10, 2005 Posted March 10, 2005 Is there a way to use latex to make a matrix? And for that matter a determinant? Thank you
matt grime Posted March 11, 2005 Posted March 11, 2005 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.
Johnny5 Posted March 11, 2005 Author Posted March 11, 2005 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?
stevem Posted March 11, 2005 Posted March 11, 2005 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now