## LaTeX forum ⇒ Math & Science ⇒ Matrix with inclined dashed line and big 0

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
BastienBastien
Posts: 40
Joined: Mon Aug 20, 2012 2:27 pm

### Matrix with inclined dashed line and big 0

Hi,

I need to make some Matrixes.
I can do simple matrix without any problem.
But, I failed at drawing an inclined, oblique dashed line in a matrix.
\ddots is not a good solution in my case.

On the following matrix, you can see that the dash line goes from the a_{2,1} (second line, first column) element, to the a_{n,n-1} element. This is what I want.

1.png (12.61 KiB) Viewed 4659 times

But on the below matrix, because the size of the two bigs '0' is higher, there is a shift between the dashed line and the "destination" '1' element.

2.png (9.25 KiB) Viewed 4659 times

First question : do you think it would be better to draw these bigs '0' by using Tikz ? If yes, how could I do it ?

Second question : do you know how to draw the dash line in a right way, without shift ? By using Tikz ? If yes, how could I do it ?

With best regards,
BastienBastien

Tags:

Stefan Kottwitz
Posts: 9281
Joined: Mon Mar 10, 2008 9:44 pm
What is your current code for this matrix?

You could use the blkarray package. Sure, TikZ can be used to draw more freely. I would just check out blkarray and bigdelim before. Also, it could be easier sometimes to use \raisebox for small tweaks.

Stefan

BastienBastien
Posts: 40
Joined: Mon Aug 20, 2012 2:27 pm
Hello,

I had a look on the packages you told me but I am not quite this could help.
Here is the code I did :

2.png (47.58 KiB) Viewed 4630 times

1.png (64.02 KiB) Viewed 2268 times

Thanks !!!!
BastienBastien

Stefan Kottwitz
Posts: 9281
Joined: Mon Mar 10, 2008 9:44 pm
It would be better if you would post your code as text, copy&paste. There's a code button above the edit field for automatic markup. We cannot copy code from images without typing every line, so I guess nobody tests long code from screenshots.

Stefan

BastienBastien
Posts: 40
Joined: Mon Aug 20, 2012 2:27 pm
Hello,

Here is the preambule :

\documentclass[10pt,a4paper,final]{report} \usepackage[utf8]{inputenc} \usepackage[francais]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amssymb} \usepackage[]{hyperref}\usepackage{moreverb}l'indentation) \usepackage{marvosym}\usepackage{schemabloc}\usepackage{steinmetz}\usepackage{color} \usepackage{fancyhdr} \usepackage[squaren, Gray, cdot]{SIunits}\usepackage{mathtools,mathrsfs}  \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}  \begin{document}

Then the Matrix's code :

$\dot{x} = \begin{bmatrix} -a_1 & -a_2 & \cdots &\cdots & -a_n\\ 1 & & & & 0\\ 0 & \ddots & &\text{\huge{0}} & \vdots\\ \vdots & \text{\huge{0}} & \ddots & & \vdots\\ 0 & \cdots & 0 & 1 & 0\\ \end{bmatrix} x+ \begin{bmatrix} 1 \\ 0 \\ \vdots \\ \vdots \\ 0 \\ \end{bmatrix} u$\\ \\  $y = \begin{bmatrix} b_1 & b_2 & \cdots & \cdots & b_n\\ \end{bmatrix} x+ \begin{bmatrix} 0 \\ \end{bmatrix} u$\\ \end{document}

Thanks !
BastienBastien
Last edited by cgnieder on Fri Nov 16, 2012 1:14 pm, edited 1 time in total.

BastienBastien
Posts: 40
Joined: Mon Aug 20, 2012 2:27 pm
Hello dear LaTeX2e users !

No idea ?
Do not waste your time, but if one of you has an idea, a path which I could follow, investigate, or some keywords, it would be great.

Regards,
Enjoy sunday evening before going back to work... !