LibreOffice-Suite-Math/C2/Matrices-Aligning-Equations/English

From Script | Spoken-Tutorial
Revision as of 11:06, 29 November 2012 by Chandrika (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Visual Cues Narration
Show Slide Number 1

Spoken tutorial on LibreOffice Math

Learning Objectives

  • Write a Matrix in Math
  • Align equations on a particular character
Welcome to the Spoken tutorial on LibreOffice Math.

In this tutorial, we will learn how to:

Write a Matrix

And Align equations on a particular character

Open the MathExample1.odt (created in part 2) For this, let us first open our example Writer document that we created in our previous tutorials: MathExample1.odt.
Pause in each page for a few seconds. Scroll to next page and repeat.

Press Control Enter to go to a new page

Click Insert>Object>Formula

Notice all the previous example formulae which we wrote using Math.

Now let us scroll to the last page of the document and press Control Enter to go to a new page.

Let us call Math by clicking Insert menu, then Object and then Formula.

All pink coloured text goes into Formula Editor Window (FEW in short)

In FEW, copy and paste:

"Example of a 2x3 Matrix:" newline newline

A ~=~ ( matrix {a # b # c ## d # e# f } ) newline newline

Point mouse over this matrix in Writer Gray box.

In mathematics, a Matrix is a rectangular array of numbers or symbols, which are called elements.

Math has separate mark up to represent a Matrix and its rows and columns of elements.

I have the examples written already so as to save time . I will copy and paste them.

Now we’ll learn how to write the 2 by 3 matrix.

In FEW Point mouse over matrix word.

In FEW, Point mouse over individual # symbol

In FEW, Point mouse over ## symbols.

In FEW, Point mouse over ( and )

Point mouse over ( and ) in Writer gray box

Type Left just before ( character and Right before ) character in the formula

Point mouse over ( and ) in the Writer gray box

In FEW, press enter once, copy and paste

"Example of 4x1 Matrix: " newline newline

B ~=~ Left ( matrix {1##2##3##4} Right ) newline newline

Point mouse over ( and ) in the last formula in Writer Gray box

In FEW, Point mouse over last line

This matrix has 2 rows and 3 columns.

We will use the markup ‘Matrix’ and include all its elements within curly brackets in the Formula Editor window.

Notice that the elements in a row are separated by one hash symbol.

And the rows are separated by two hash symbols.

Use parentheses to enclose the matrix in brackets.

Now, notice that the brackets are short and do not cover all the elements in the matrix entirely.

They are of the same size as each element, and hence are not scalable to the size of the matrix.

To solve this, we can use the words ‘Left’ and ‘Right’

i.e. Left just before open bracket and Right before close bracket to make the brackets scalable.

Let me copy and paste the next example.

So a 4 by1 matrix will look like as shown on the screen.

Notice the scalable brackets in the Writer gray box.

The markup for the matrix is as shown on the screen.

Here we can also use square brackets instead of parentheses.

So using the matrix mark up, we can write matrices of any dimensions.

In Formula Editor Window (FEW in short), press enter twice,

Copy and paste:

"Example of Matrix Addition:" newline newline

Left( matrix {a # b # c ## d # e# f } Right)

Left( matrix {%alpha # %beta # %gamma ## %theta # %eta # %mu } Right) newline newline

Click in between the gap of these two matrices in the Writer Gray box.

Point mouse over the cursor in the FEW.

Type ~+~ in between these two matrices

Type ~=~ at the end of the last line.

And then copy and paste at the end:

Left( matrix {a+%alpha # b+%beta # c+%gamma ## d+%theta # e+%eta # f+%mu } Right) newline newline

Point mouse over the last formula in the Writer gray box

Click File > Save

Now let us write an example for Matrix addition.

Let us go to a new line in the Formula Editor Window. We can press the Enter key twice to add two blank lines.

First let us write two example 2 by 3 matrices side by side as shown on the screen.

Next, let us add a plus symbol in between these two matrices to denote addition.

To do this, we can simply click between the gap of these two matrices in the Writer Gray box.

Notice that the cursor in the Formula Editor Window is placed roughly between the two matrix mark ups here.

Type plus in between these two matrices

So there is the plus symbol.

Next let us add an ‘equal to’ symbol at the end with long gaps

And then the third matrix on the right denoting the addition.

Notice that we have used Greek characters in our example.

So there is the result of the addition of two matrices.

Let us save our work.

In Formula Editor Window (FEW in short), press enter twice,

Copy and paste:

"Example of Matrix multiplied by a number: " newline newline 4 times

Left( matrix {%alpha # %beta # %gamma ## %theta # %eta # %mu } Right)

Type ~=~ at the end.

Copy and paste at the end:

Left( matrix {4%alpha # 4%beta # 4%gamma ## 4%theta # 4%eta # 4%mu } Right) newline newline

Point mouse over the last formula in Writer Gray box

Click on Format, and point on the sub menu slowly one by one.

Click on Spacing

Click on the category drop down on the right, and choose matrices

Change Line spacing to 20%, column spacing to 50% and click Ok.

Point mouse over Writer gray box.

Click File > Save.

Next, let us see an example of multiplying a matrix by a number.

We will write a 2 by 3 matrix and multiply it by 4.

We will first write ‘4 times’ followed by the matrix.

Let me copy the matrix and paste it in FEW.

Next let us write the ‘equal to’ symbol at the end with long gaps

Followed by the matrix product. I am copying and pasting the mark up for the matrix product.

So there is the product of multiplying a 2 by 3 matrix by a number.

Now, we can format matrices by clicking on the Format menu and choosing the font, font sizes, alignment or the spacing.

For example, let us choose spacing.

In the category drop down on the right, let us choose Matrices.

And change the line spacing to 20 percent and column spacing to 50 percent. Click OK.

Notice how the matrices and their elements are well spaced out.

Let us save our work now by clicking on File and Save.

In Formula Editor Window (FEW in short), press enter twice,

Copy and paste:

"Simultaneous Equations: " newline newline

2x+y = 8 newline

x+y=6 newline newline

Point mouse over the last formula Write Gray box

Point mouse over 2x, point over y, point over ‘=’

Now, we can also use matrices to write two or three equations and then align them on a particular character.

For example, we can write simultaneous equations and align them on the ‘equal to’ character.

Let us write a set of Simultaneous equations now as shown on the screen.

Notice that they are not perfectly aligned on the ‘equal to’ character.

So, here we can use the matrix mark up to align them.

We can separate each part in the equation and treat the parts as elements of a matrix.

Here, 2x is a part, y is a part, ‘equal to’ character is a part and so on.

In FEW, press enter twice, copy and paste:

matrix { 2x # {}+{} # y # {}={} # 8 ## x # {}+{} # y # {}={} # 6 }

In FEW, point mouse over matrix word

Point mouse over # symbols

Point mouse over ## symbol

Point mouse over the last formula Write Gray box

Press enter twice. Copy and paste the mark up. And, thus the new mark up looks like as shown on the screen.

Here, we have used the matrix mark up, treated each part of the equation as an element and separated them by # symbols.

We have used the double hash symbols to separate the two equations.

So there is a perfectly aligned set of equations.

In FEW, press enter twice, copy and paste:

newline newline

x+y=2 newline

x=2-y newline newline

Point mouse over last formula in the Writer Gray box

In FEW, press enter twice, copy and paste:

matrix{ alignr x+y # {}={} # alignl 2 ## alignr x # {}={} # alignl 2-y }

In FEW, point mouse over alignr and alignl and the ‘=’ character.

Point mouse over the last formula Write Gray box

Let us write another set of equations.

Here let us suppose that we don’t have equal number of parts on the left and right of the ‘equal to’ character.

Notice the equations on the screen, and they are not aligned on the ‘equal to’ character.

Let us rewrite the mark up to align them. Press enter twice. I am copying and pasting the markup.

So here, we have used alignr and alignl to align the parts to the right and left of the ‘equal to’ character.

And there is our perfectly aligned set of equations.

Show Slide Number 2

Assignment:

1. Write steps for multiplying a 2x3 matrix by a 3x1 matrix. Use formatting to change the fonts, sizes and the spacing.

2. Write a set of three equations. Align the equations at the = symbols and space them out uniformly.

Here is an assignment for you:

1. Write steps for multiplying a 2x3 matrix by a 3x1 matrix. Use formatting to change the fonts, sizes and the spacing.

2. Write a set of three equations. Align the equations at the ‘equal to’ character.

Show Slide Number 3

Summary:

  • Write a Matrix in Math
  • And Align equations on a particular character
This brings us to the end of this tutorial on Matrix and Aligning equations in LibreOffice Math.

To summarize, we learned the following topics:

Write a Matrix And Align equations on a particular character

Acknowledgement Slide Spoken Tutorial Project is a part of the Talk to a Teacher project, supported by the National Mission on Education through ICT, MHRD, Government of India.

This project is co-ordinated by http://spoken-tutorial.org.

More information on the same is available at the following link http://spoken-tutorial.org/NMEICT-Intro.

This script has been contributed by Priya Suresh, Desicrew Solutions and this is (the name of the narrator and affiliation and place) signing off. Thanks for joining.

Contributors and Content Editors

Chandrika