# S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
 It is currently Mon, 20 May 2013 22:51:03 UTC

 All times are UTC [ DST ]

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Formatting within a matrix...Posted: Wed, 8 Oct 2008 17:18:56 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Wed, 6 Apr 2005 01:33:29 UTC
Posts: 627
Location: Virginia Beach, VA
I'm using the following code:

Code:
$L = \begin{bmatrix} 1 & -1 & 0 & 0\\ -1 & 3 & -1 & -1\\ 0 & -1 & 2 & -1\\ 0 & -1 & -1 & 2 \end{bmatrix}$

to create this:

But I don't like how the -1's don't line up. Is there a way I can make it right justified?

_________________
It's quiet now; and as I think my thoughts alone,
I try to keep my head straight, but I think I'm too far gone.
For in this silence, the truth rings even louder.
A constant grinding, begging recognition of its power.

Top

 Post subject: Posted: Wed, 8 Oct 2008 17:33:35 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Sat, 7 Jan 2006 18:29:24 UTC
Posts: 1401
Location: Leeds, UK
This is a laborious way to do it, but you can put a phantom minus sign in front of all the non-negative elements so that they line up.

Code:
$L = \begin{bmatrix} \phantom{-}1 & -1 & \phantom{-}0 & \phantom{-}0\\ -1 & \phantom{-}3 & -1 & -1\\ \phantom{-}0 & -1 & \phantom{-}2 & -1\\ \phantom{-}0 & -1 & -1 & \phantom{-}2 \end{bmatrix}$

Then you get

Top

 Post subject: Re: Formatting within a matrix...Posted: Thu, 9 Oct 2008 00:15:26 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Mon, 19 May 2003 19:55:19 UTC
Posts: 7949
Location: Lexington, MA
Hello, Starx!

I use \text{-} to produce a short minus-sign.

. . and it too is laborious . . .

Code:
$$L = \begin{bmatrix} 1 & \text{-}1 & 0 & 0 \\ \text{-}1 & 3 & \text{-}1 & \text{-}1 \\ 0 & \text{-}1 & 2 & \text{-}1 \\ 0 & \text{-}1 & \text{-}1 & 2 \end{bmatrix}$$

Opalg, I like that "phantom" feature!
Makes me want to experiment with it . . .

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 All times are UTC [ DST ]

#### Who is online

Users browsing this forum: No registered users

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forum

Search for:
 Jump to:  Select a forum ------------------ High School and College Mathematics    Algebra    Geometry and Trigonometry    Calculus    Matrix Algebra    Differential Equations    Probability and Statistics    Proposed Problems Applications    Physics, Chemistry, Engineering, etc.    Computer Science    Math for Business and Economics Advanced Mathematics    Foundations    Algebra and Number Theory    Analysis and Topology    Applied Mathematics    Other Topics in Advanced Mathematics Other Topics    Administrator Announcements    Comments and Suggestions for S.O.S. Math    Posting Math Formulas with LaTeX    Miscellaneous