Pages

Friday, 5 June 2015

Relations and Functions

Dear Student after discussion of Sets and related properties of Sets, We shall now discuss the Relations and Functions.

Ordered Pairs
Suppose, for instance, that the set $A= \{a, b, c, d\}$ of distinct elements, and suppose that we want to consider its elements in the order $cb d a$. We may have the sets $\{c\}, \{c, b\}, \{c, b, d\}, \{c, b, d, a\}$. We can go on then to consider the set (or collection) ,
$ $$\mathcal{C}$$ = \{\{a,b, c, d\}, \{b,c\}, \{b, c, d\}, \{c\}\}$

If $A =\{a, b\}$ and if, in the desired order, $a$ comes first, then  $ $$\mathcal{C}$$= \{\{a\}, \{a, b\}\}$; if, however, $b$ comes first, then $ $$\mathcal{C}$$= \{\{b\}, \{a, b\}\}$


The ordered pair of $a$ and $b$, with first coordinate $a$ and second coordinate $b$, is the set $(a, b)$ defined by $(a, b) = \{\{a\}, \{a, b\}\}$.

Note that
If $(a, b)$ and $(x, y)$ are ordered pairs and if $(a, b) = (x, y)$, then $a = x$ and $b = y$.

Cartesian product of $A$ and $B$ is characterized by $A \times  B=  \{ x \mid  x  =(a, b)$ for some $a \in A$ and for some $b \in B\}$.
The Cartesian product of two sets is a set of ordered pairs (that is, a set each of whose elements is an ordered pair), and the same is true of every subset of a Cartesian product.
For example, if $A = \{1, 2\}$ and $B = \{2, 3, 4\}$, then $A \times B = \{(1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4)\}$ and  $B \times A = \{(2, 1), (2, 2), (3, 1), (3, 2), (4, 1), (4, 2)\}$
Therefore , for instance, we have $(1, 2) \in  A\times B$ and $(1, 2) \notin B \times A$

If $A, B, C$, and $D$ are sets, then
(i) $(A \cup B)\times C = (A \times C) \cup (B\times C)$,
(ii) $(A \cap B)  \times (C \cap D) = (A \times C) \cap  (B\times D)$
(iii) $(A- B) \times C = (A\times C) - (B\times C)$

If either $A = \varnothing $ or $B = \varnothing $, then $A\times  B =\varnothing $, and conversely. If $A \subset C, B \subset D$, then $A \times B \subset  C \times D$, and (provided $A \times  B \neq \varnothing$) conversely.


RELATIONS:
A set $R$ is a relation if each element of $R$ is an ordered pair; this means, if $z \in R$, then there exist $x$ and $y$ so that $z = (x, y)$ . If $R$ is a relation, it is sometimes convenient to express the fact that $(x,y)\in R$ by writing $x R y$  For example: let $A$ be any set, and let $R$ be the set of all those pairs $(x, y)$ in $ A \times A $ for which $x = y$. The relation $R$ is just the relation of equality between elements of $A$; if $x$ and $y$ are in $A$, then $x R y$ means the same as $x = y$.

Domain and Range of $R$: We define dom $R = \{ x \mid $ for some $y (x R y)\}$ and Range $R = \{ y \mid $ for some $x (x R y)\}$

Both the domain and the range of $\varnothing$ are equal to $\varnothing$. If $R = A\times B$, then dom $R = A$ and  ran $R = B$. If $R$ is equality in $A$, then dom $R = $ range $R = A$

If  $ R $ is belonging, between $A$ and $  $$\mathcal{P}$$ (A) $, then dom $R = A$ and ran $R =  $$\mathcal{P}$$ (A) - \{\varnothing\}$

If $R$ is a relation included in a Cartesian product $A\times B$  (so that dom $R \subset A$ and ran $R \subset B$), it is sometimes convenient to say that $R$ is a relation from $A$ to $B$; instead of a relation from $A$ to $A$ we may speak of a relation in $A$. A relation $R$ in $A$ is reflexive if $x R x$ for every $x$ in $A$; it is symmetric if $x R y$ implies that $y R x$; and it is transitive if $x R y$ and $y R z$ imply that $x R z$.

FUNCTIONS
If $A$ and $B$ are sets, a, function from (or on) $A$ to (or into) $B$ is a relation $f$ such that dom $f = A$ and such that for each $x$ in $A$ there is a unique  element $y$ in $B$ with $(x, y) \in f $. The uniqueness condition can be formulated explicitly as follows: if $(x, y)  \in f $ and $(x, z) \in f $, then $y = z$. For each $x$ in $A$, the unique $y$ in $B$ such that $(x, y) \in f $ is denoted by $f(x)$. From now on, if $f$ is a function, we shall write $f(x) = y$ instead of $(x, y)  \in f $ or $x f y$. The element $y$ is called the value that the function $f$ assumes (or takes on) at the argument $x$; equivalently we may say that $f$ sends or maps or transforms $x$ onto $y$. The words map or  mappingtransformationcorrespondence, and operator are among some of the many that are sometimes used as synonyms for function. The symbol $f:A \rightarrow B $ is sometimes used as an abbreviation for "$f$ is a function from $A$ to $B$." The set of all functions from $A$ to $B$ is a subset of the power set $ $$\mathcal{P}$$(A \times B)$; it will be denoted by $B^{A}$.

The domain of a function $f$ from $A$ into $B$ is, by definition, equal to $A$, but its range need not be equal to $B$; the range consists of those elements $y$ of $B$ for which there exists an $x$ in $A$ such that $f(x) = y$. If the range of $f$ is equal to $B$, we say that $f$ maps $A$ onto $B$. If $E$ is a subset of $A$, we may want to  consider the set of all those elements $y$ of $B$ for which there exists an $x$ in the subset $E$ such that $f(x) = y$. This subset of $B$ is called the image of $E$ under $f$  and is frequently denoted by $f(E)$. (this means we consider  the set of values of $f$ at the elements of $E$ ). Note that the image of $A$ itself is the range of $f$; the "onto" character of $f$ can be expressed by writing $f(A) = B$.

If $A$ is a subset of a set $B$, the function $f$ defined by $f(x) = x$ for each $x$ in $A$ is called the inclusion map (or the embedding, or the injection) of $A$ into $B$. The inclusion map of $A$ into $A$ is called the identity map on $A$.

If $f$ is a function from $B$ to $C$, say, and if  $A$ is a subset of $B$, then there is a natural way of constructing a function $g$ from $A$ to $C$;  define $g(x)$ to be equal to $f(x)$ for each $x$ in $A$. The function $g$ is called the restriction of $f$ to $A$, and $f$ is called an extension of $g$ to $B$; The definition of restriction can be expressed by writing $(f  \mid A)(x) = f(x)$ for each $x$ in $A$; observe also that ran $(f \mid A) = f(x) $.

A function that always maps distinct elements onto distinct elements is called one-to-one (usually a one-to-one correspondence).

INVERSE FUNCTION
Associated with every function $f$, from $A$ to $B$, say, there is a function from    $ $$\mathcal{P}$$ (A) $ to $ $$\mathcal{P}$$ (B)$, namely the function (frequently called $f$ also) that assigns to each subset $E$ of $A$ the image subset $f(E)$ of $B$.

Given a function $f$ from $A$ to $B$, let $f^{-1}$, the inverse of $f$, be the function from $ $$\mathcal{P}$$ (B)$ to $ $$\mathcal{P}$$ (A) $ such that if $D \subset B$ , then $f^{-1}(D) = \{x \in A \mid f(x) \in D \}$.

In words: $f^{-1}(D)$ consists of exactly those elements of $A$  that $f$ maps into $D$; the set $f^{-1}(D)$ is called the inverse image of $D$ under $f$. A necessary and sufficient condition that $f$ map $A$ onto $B$ is that the  inverse image under $f$ of each non-empty subset of $B$ be a non-empty subset of $A$.

A necessary and sufficient condition that $f$ be one-to-one is that the inverse image under $f$ of each singleton in the range of $f$ be a singleton in $A$,  alternatively  the function whose domain is the range of $f$, and whose value for each $y$ in the range of $f$ is the unique $x$ in $A$ for which $f(x) = y$. In other words, for one-to-one functions $f$ we may write $f^{-1}(y) = x$ if and only if $f(x) = y$. Note that if $D \subset B$ then $f(f^{-1}(D)) \subset D$

COMPOSITE FUNCTION
 If   $f$ is a function from $A$ to $B$ and $g$ is a function from $B$ to $C$, then every element in the range of $f$ belongs to the domain of $g$, and, consequently, $g(f(x))$ makes sense for each $x$ in $A$. The function $h$  from $A$ to $C$, defined by $h(x) = g(f(x))$ is called the composite of the functions $f$ and $g$; it is denoted by $ g \circ f $ or, more simply, by $gf$,

Examples of Functions
  1. $f :$$\mathcal{R}$$ \rightarrow  $$\mathcal{R}$$ $ defined by polynomials, such as the       example $f (x) = x^{2} + x + 1$
  2. The rational functions $f :$$\mathcal{R}$$ \rightarrow  $$\mathcal{R}$$ $  such as $f(x) = \dfrac{x^{3}-4x^{2}+x -11}{(x^{2}+1)^{5}}$
  3. The absolute value $f :$$\mathcal{R}$$ \rightarrow  $$\mathcal{R}$$+ $ such as $f(x) = \cases{x & \text{ if } x \geq 0 \\ -x & \text{ if } x < 0}$
  4. Analytic functions from $f :$$\mathcal{R}$$ \rightarrow  $$\mathcal{R}$$ $  such as $f(x) = \sin{x}, f(x) = \log{x}$
Dear Student view the following file for Function Graph




Sample Quiz Questions


Back to Basic Mathematics



Wednesday, 3 June 2015

Introduction to MATLAB

Dear Student in this post, I discuss introduction to MATLAB bascis. One can learn MATLAB by following the link in.mathworks.com  also.

Introduction
MATLAB(short name for MATrix LABoratory) is a special-purpose computer program optimized to perform engineering and scientific calculations. It started life as a program designed to perform matrix mathematics, but over the years it has grown into a flexible computing system capable of solving essentially any technical problem.

The fundamental unit of data in any MATLAB program is the array.An array is a collection of data values organised into rows and columns, and known by a single name. Individual data values within array may be accessed by including the name of the array followed by subscripts in parentheses that identify the row and column of the particular value.

The MATLAB Desktop
When you start MATLAB, a special window called MATLAB desktop appears. The default configuration of the MATLAB desktop is shown in figure. It integrates many tools for managing files, variables, and applications within the MATLAB environment. The major tools within or accessible from the MATLAB desktop are the following:



  1. The Command Window
  2. The Command History Window
  3. The Edit/Debug Window 
  4. Figure Windows
  5. Workspace Browser and Array Editor
  6. Help Browser
  7. Current Directory Browser
The Command Window
The middle of the MATLAB desktop contains the Command Window. A user can enter interactive commands at the command prompt ($\texttt{>>}$)in the Command Window, and they will be executed on the spot.

Suppose you type:
$\texttt{>>}$ area = pi * 2.5^2
area =
19.6350

MATLAB calculates the answer as soon as the Enter key is pressed and stores the answer in a variable ($1 \times 1$ array) called $\texttt{area}$

If a statement is too long to type on a single line, it may be continued on successive lines by typing an $\textbf{ellipsis}$($\ldots$) at the end of the first line, and then continuing the next line. For example, the following two statements are identical.

x1 = 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6;
x1 = 1 + 1/2 + 1/3 + 1/4 ...
    + 1/5 + 1/6;

A series of commands may be placed into a file, and then the entire file may be executed by typing its name in the Command Window. Such files are called $\textbf{script files}$. Script files are also known as M-files because they have a file extension of ".m"

Variables and Arrays
The fundamental unit of data in any MATLAB program is the $\textbf{array}$. Arrays can be classified as either $\textbf{vectors}$ or $\textbf{matrices}$. The $\textbf{size}$ of an array is specified by the number of rows and the number of columns in the array, with the number of rows mentioned first. The total number of elements in the array will be rows $\times$ columns. A MATLAB variable is a region of memory containing an array, which is known by a user-specified name. MATLAB variable names must begin with a letter, followed by any combination of letters,numbers, and the underscore ($\_$)character.

Initializing Variables
There are three common ways to initializing a variable in MATLAB.

  1. Assign data to the variable in an assignment statement. 
  2. Input data into the variable from the keyboard. 
  3. Read data from file.

See the Video for Assign Statement:




If an assignment statement is typed without the semicolon, the results of the statement are automatically displayed in the Command Window.

Shortcut Expressions: MATLAB provides a special shortcut notations when the array contains hundreds or even thousands of elements. The general expression is $\texttt{first:incr:last}$



Built-in Functions: Arrays can also be initialized using built-in MATLAB FUNCTIONS

$\texttt{zeros(n)}$  Generates an  $n \times n$  matrix of zeros.
$\texttt{zeros(n, m)}$ Generates an $n \times m$  matrix of zeros.
$\texttt{zeros(size(arr))}$ Generates a matrix of zeros of the same size as arr.
$\texttt{ones(n)}$ Generates an $n \times n$  matrix of ones.
$\texttt{ones(n, m)}$ Generates an $n \times m$ matrix of ones.
$\texttt{ones(size(arr))}$  Generates a matrix of ones of the same size as arr.
$\texttt{eye(n)}$Generates an $n \times n$ identity matrix.
$\texttt{eye(n, m)}$ Generates an $n \times m$ identity matrix.
$\texttt{length(arr)}$ Returns the length of a vector or the longest dimension of a 2-D array.
$\texttt{size(arr)}$Returns two values specifying the number of rows and columns in arr.
$\texttt{reshape(A,m,n)}$ Rearrange a matrix A that has $r$ rows and $s$ columns to have $m$ rows and $n$ columns. $r \times s$ must be equal to $m \times n$.
$\texttt{diag(v)}$ When v is a vector creates a square matrix with the elements of v in the diagonal.
$\texttt{diag(A)}$ When A is matrix, creates a vector from the diagonal elements of $\texttt{A}$.
$\texttt{length(v)}$  Returns the number of elements in the vector $\texttt{v}$.


Keyboard Input
It is also possible to prompt a user and initialize a variable with data that he or she types directly at the keyboard by using $\texttt{input}$ function.

If $\texttt{input}$ function includes the character 's' as a second argument, then the input data is returned to the user as a character string.


Multidimensional Arrays
Multidimensional Arrays have one subscript for each dimension,and individual element is selected by specifying a value for each subscript. The total number of elements in the array will be the product of the maximum value of each subscript.

SubArrays
To select a portion of an array, just include a list of all the elements to be selected in the parentheses after the array name. When used in array subscript the $\texttt{end}$ function returns the highest value taken by that a subscript.


$\texttt{va(:)}$ Refers to all the elements of the vector $\texttt{va}$ (either a row or a column vector).
$\texttt{va(m:n)}$ Refers to elements $m$ through $n$ of the vector $\texttt{va}$.
$\texttt{A(:,n)}$ Refers to the elements in all the rows of column $n$ of the matrix $\texttt{A}$.
$\texttt{A(n,:)}$ Refers to the elements in all the columns of row $n$ of the matrix $\texttt{A}$.
$\texttt{A(:,m:n)}$ Refers to the elements in all the rows between columns $m$ and $n$ of the matrix $\texttt{A}$.
$\texttt{A(m:n,:)}$ Refers to the elements in all the columns between rows $m$ and $n$ of the matrix $\texttt{A}$.
$\texttt{A(m:n,p:q)}$  & Refers to the elements in rows $m$ through $n$ and columns $p$ through $q$ of the matrix $\texttt{A}$

Display Format and Function

The $\texttt{format}$ command changes the default format. The $\texttt{disp}$ function accepts an array argument and display the value of array in the Command Window. $\texttt{fprintf}$ function displays one or more values together with related text.

Output Display Formats
$\texttt{format short}$ 4 digits after decimal (default format)
$\texttt{format long}$ digits after decimal
$\texttt{format short e}$5 digits plus exponent
$\texttt{format short g}$ 5 total digits with or without exponent
$\texttt{format long e}$ 15 digits plus exponent
$\texttt{format long g }$ 15 total digits with or without exponent
$\texttt{format bank}$ dollars and cents format
$\texttt{format hex}$ hexadecimal display of bits
$\texttt{format rat}$ approximate ratio of small integers
$\texttt{format compact}$ suppress extra line feeds
$\texttt{format loose}$  restore extra line feeds
$\texttt{format +}$ Only the signs of the numbers are printed





Scalar and Array Operations
Calculations are specified in MATLAB with an assignment statement:
$\texttt{variable_name = expression;}$

Array and Matrix Operations

Array Addition : $\texttt{a + b}$ Array addition and matrix addition are identical.

Array Subtraction: $\texttt{a - b}$ Array subtraction and matrix subtraction are identical.

Array Multiplication: $\texttt{a . * b}$ Element-by-element multiplication of $\texttt{a}$ and $\texttt{b}$. Both arrays must be the same shape, or one of them must be a scalar.

Matrix Multiplication: $\texttt{a * b}$ Matrix multiplication of $\texttt{a}$ and $\texttt{b}$. The number of columns in $\texttt{a}$ must equal the number of rows in $\texttt{b}$.

Array Right Division:  $\texttt{a . / b}$  Element-by-element division of $\texttt{a}$ and $\texttt{b}$: $\texttt{a (i , j ) / b (i, j )}$. Both arrays must be the same shape, or one of them must be a scalar.

Array Left Division:  $\texttt{a . \ b}$ Element-by-element division of $\texttt{a}$ and $\texttt{b}$, but with $\texttt{b}$ in the numerator: $\texttt{b (i, j ) /a (i, j )}$. Both arrays must be the same shape, or one of them must be a scalar.

Matrix Right Division:  $\texttt{a / b}$ Matrix division defined by $\texttt{a *inv(b)}$, where $\texttt{inv (b)}$ is the inverse of matrix $\texttt{b}$.


Matrix Left Division:  $\texttt{a $\smallsetminus$ b}$ Matrix division defined by $\texttt{inv (a) * b}$, where $\texttt{inv (a)}$ is the inverse of matrix $\texttt{a}$.



Hierarchy of Arithmetic Operations
MATLAB has established a series of rules governing the hierarchy, or order, in which operations are calculated within an expression.


Built-in MATLAB Functions and Constants

One of MATLAB's greatest strengths is that it comes with an incredible variety of built-in functions for use.
$\texttt{pi}$  Contains $\pi$ to 15 significant digits.
$\texttt{i, j}$ Contain the value $i$ $\sqrt{-1}$.
$\texttt{Inf}$ This symbol represents machine infinity. It is usually generated as a result of a division by 0.
$\texttt{NaN}$ This symbol stands for Not-a-Number. It is the result of an undefined mathematical operation, such as the division of zero by zero.
$\texttt{clock}$ This special variable contains the current date and time in the form of a 6-element row vector containing the year, month, day, hour, minute, and second.
$\texttt{date}$ Contains the current data in a character string format, such as $\texttt{24-Nov-1999}$.
$\texttt{eps}$ This variable name is short for epsilon. It is the smallest difference between two numbers that can be represented on the computer.
$\texttt{ans}$ A special variable used to store the result of an expression if that result is not explicitly assigned to some other variable.



Plotting Data (Two dimensional Plots)
To plot a data set, create two vectors containing the $x$ and $y$ values to be plotted, and use the $\texttt{plot}$ function.


Multiple Plots Suppose that we want to plot the function $f(x)=\sin(2x)$ and its derivative $\dfrac{d}{dx}\sin(2x)=2\cos(2x)$


MATLAB Program:MATLAB Script
Temperature conversion Program

The relationship between temperature in degree Fahrenheit $(^{0}F)$ and temperature in kelvin(K) can be given by $T(K) = \dfrac{5}{9}\left(T(^{0}F) - 32.0\right)+273.15$ The evaluation of this formula can be done by creating a script file temp$\_$conversion.m (say)



Dear Student,after watching these videos, you can write  simple MATLAB programs from your area of study. The above videos show basic commands and their respective outputs which are summarized in following document with additional commands for your reference. Send your comments about these posts. 

Tuesday, 2 June 2015

Numbers and Sets

Dear Students, here we  shall discuss brief introduction to numbers.


We begin with counting numbers $1,2,3,\ldots$ which are called natural numbers
Integer numbers consist of natural numbers together with their negatives and zero $\ldots,-3,-2,-1,0,1,2,3,\ldots$
We shall use $a,b,\ldots,n$, $p,q,\ldots, x,y, \ldots$ to denote integers, positive or negative.
An integer $a$ is said to be divisible by another integer $b$, not $0$, if there is a third integer $c$ such that $a=bc$.
A rational number is a number that can be expressed as $\dfrac{a}{b}$ in which $a$ is an integer and $b$ is natural number.
The numbers that are not  ratios (numbers that are not rational) are called irrational numbers
Real numbers are all "decimal numbers" that correspond to points on number line.

An integer $n$ is called prime number  if $n > 1$ and if the only positive divisors of $n$ are $1$ and $n$. If $n > 1$ and if $n$ is not prime, then $n$ is called composite.

Geometric Progression and Exponential Growth:
An arithmetic progression is a list of numbers with the property that to get from any number to the next we need to add a fixed number. In case when addition  is replaces by multiplication it is called Geometric progression.

To generate Geometric progression we must be given first number and the constant multiple (known as ratio) that generates successive numbers on the list.
For example we start with $1$ and the ratio is $2$, then geometric progression is: $1,2,4,8,16,32,\ldots$
Note that $\dfrac{2}{1}=2, \dfrac{4}{2}=2, \dfrac{8}{4}=2, \dfrac{16}{8}=2, \dots$ hence the constant multiple is called ratio. It is easy to see that the generic term in this geometric progression is $2^{n}$ for some natural number $n$.

In general if we start with $1$ and have a ratio $r$, then geometric progression is $1,r,r^{2},r^{3},\ldots r^{n},\ldots$. Since the varying quantities is the exponent $n$, we say  that $r^{n}$ grows exponentially if $r > 1$ ; for $0 < r < 1$ we say $r^{n}$ decays exponentially

If we start with $1$ and the ratio is $\dfrac{1}{2}$, then geometric progression is: $1,\dfrac{1}{2},\dfrac{1}{4},\dfrac{1}{8},\dfrac{1}{16},\dfrac{1}{32},\ldots$

SET THEORY

Any well-defined collection of objects is a set.If $A$ is a set, then the objects in the collection $A$ are called either the members of $A$ or the elements of $A$.


A set consists of elements (we use numbers) Notation: $x \in M$ means that $x$ is an element of a set $M$ (belongs to $M$).

Some sets occur frequently in mathematics, and it is convenient to adopt a standard notation for them:
$ $$\mathcal{N}$$ $ : the set of all natural numbers (i.e., the numbers 1, 2, 3, etc.)
$ $$\mathcal{Z}$$ $ : the set of all integers (i.e., 0 and all positive and negative whole numbers)
$ $$\mathcal{Q}$$ $: the set of all rational numbers (i.e., fractions)
$ $$\mathcal{R}$$ $: the set of all real numbers
$ $$\mathcal{R+}$$ $ : the set of all non-negative real numbers

There are several ways of specifying a set. If it has a small number of elements we can list them. In this case we denote the set by enclosing the list of the elements in curly brackets; thus, for example, $\{1, 2, 3, 4, 5\}$ denotes the set consisting of the natural numbers 1, 2, 3, 4, and 5. By use of “dots” we can extend this notation to any finite set, e.g., $\{1, 2, 3,\ldots,n\}$ denotes the set of the first $n$ natural numbers. Again $\{2, 3, 5, 7, 11, 13, 17, . . ., 53\}$ could  be used to denote the set of all primes up to 53.

Certain infinite sets can also be described by the use of dots (only now the dots have no end), e.g.,
$\{2, 4, 6, 8,\ldots , 2n, \ldots\}$ denotes the set of all even natural numbers. Again, $\{\ldots ,−8,−6,−4,−2, 0, 2, 4, 6, 8, \ldots \}$ denotes the set of all even integers.

In general, however, except for finite sets with only a small number of elements, sets are best described by giving the property which defines the set. If $S(x)$ is some property, the set of all those $x$ that satisfy $S(x)$ is denoted by $\{x \mid S(x)\}$, Or, if we wish to restrict the $x $ to those which are members of a certain set $A$, we would write $\{x \in A \mid S(x)\}$
This is read “the set of all $x$ in $A$ such that $S(x)$”. For example:
$ $$\mathcal{N}$$ = \{x \in $$\mathcal{Z}$$ \mid x > 0\}$
$ $$\mathcal{Q}$$ = \{m/n \mid m, n \in $$\mathcal{Z}$$, n \neq 0 \}$
$\{\sqrt{2}, -\sqrt{2} \} = \{x \in $$\mathcal{R}$$ \mid x^{2} = 2\}$
$\{1, 2, 3\} = \{x \in $$\mathcal{N}$$ \mid x < 4\}$


A set $A$ is a subset of a set $B$ $(A \subset B)$ if each element of $A$ is also an element of $B$. In this case $B$ is called a superset of $A$.

Power Set: For each set there exists a collection of sets that  contains among its elements all the subsets of the given set. In other words, if $E$ is a set, then there exists a set (collection)  $ $$\mathcal{P}$$ $ such that if $D \subset E$, then $D \in $$\mathcal{P}$$ $
The set  $ $$\mathcal{P}$$ = \{D: D \subset E\} $ is called power set of $E$
For example, if $E = \{1, 2, 3\}$, then  $ $$\mathcal{P}$$(E) = \{\varnothing, \{1\}, \{2\}, \{3\}, \{1, 2\}, \{1, 3\}, \{2, 3\}, \{1, 2, 3\}\}$

Two sets $A$ and $B$ are equal $(A = B)$ if they consist of the same elements (i.e., if $A \subset B$ and $B \subset A$).

 If $A$ is a subset of $B$ and $A \neq B$, then $A$ is called a proper subset of B (notation: $A \subsetneq B$).

The empty set $\varnothing$ (called also the null set) contains no elements. It is a subset of any set.
The empty set can be specified in many
ways, e.g.,
$\varnothing  = \{x \in $$\mathcal{R}$$ \mid x^{2} < 0\}$
$\varnothing = \{x \in $$\mathcal{N}$$ \mid 1 < x < 2\}$
$\varnothing  = \{x \mid  x \neq x\}$

Notice that $\varnothing$ and $ \{\varnothing \}$ are quite different sets. $\varnothing$ is the empty set: it has NO members. $ \{\varnothing \}$ is a set that has ONE member. Hence $\varnothing \neq   \{\varnothing \}$

The intersection $A \cap B$ of two sets $A$ and $B$ consists of all elements that belong both to $A$ and to $B$:

$A \cap B = \{x | x \in A$ and $x \in B\}$.
The basic facts about intersections:
$A \cap \varnothing = \varnothing$
$A \cap B = B \cap A$ (commutativity),
$A \cap (B \cap C) = (A \cap B) \cap A$ (associativity),
$A \cap A = A $ (idempotence),
$A \subset B$ if and only if $A \cap B = A$

The union $A \cup B$ consists of all elements of $A$ and all elements of $B$ (and no other elements):
$A \cup B = \{x | x \in A$ or $x \in B\}$.
Here are some  facts about the unions of pairs:
$A \cup \varnothing = A$
$A \cup B = B \cup A$ (commutativity),
$A \cup (B \cup C) = (A \cup B) \cup A$ (associativity),
$A \cup A = A $ (idempotence),
$A \subset B$ if and only if $A \cup B = B$

Two useful facts about unions and intersections involve both the operations at the same time:
$A  \cap  (B \cup C) = (A \cap B) \cup (A \cap C)$,
$A  \cup  (B \cap C) = (A \cup B) \cap (A \cup C)$
These identities are called the distributive laws.

The set difference $A \setminus B$ (or $A-B$, as the relative complement of $B$ in $A$,) consists of elements of $A$ that are not elements of $B$:
$A\setminus B = \{x | x \in A$ and $x \notin B\}$. Note that in this definition it is not necessary to assume that $B \subset A$.

There is a special case: if $B$ is a subset of $A$, the difference $A\setminus B$ is also called a complement of $B$ in $A$.

We assume  that all the sets to be mentioned are subsets of one and the same set $U$ and that all complements (unless otherwise specified) are formed relative to that $U$.
An often used symbol for the temporarily absolute (as opposed to relative) complement of $A$ is $A^{\prime}$. In terms of this symbol the basic facts about complementation can be stated as follows:
$(A^{\prime})^{\prime} = A$
$\varnothing^{\prime}=U, U^{\prime} = \varnothing$
$A \cap A^{\prime} = \varnothing, A \cup A^{\prime} = U$
$A \subset B$ if and only if $B^{\prime} \subset A^{\prime}$

The most important statements about complements are the so-called De -Morgan laws:
$(A \cup B)^{\prime} = A^{\prime} \cap B^{\prime}$ and $(A \cap B)^{\prime} = A^{\prime} \cup B^{\prime}$

Here are some easy exercises on complementation.
$A - B = A \cap B^{\prime}$.
$A \subset B$ if and only if $A-B = \varnothing $.
$A- (A-B) = A \cap B$.
$A \cap (B - C) = (A \cap B) - (A \cap C)$.
$A \cap B \subset  (A \cap C)\cup  (B \cap C^{\prime})$
$(A \cup C)\cap  (B \cup C^{\prime}) \subset A \cup B$

The symmetric difference $A\bigtriangleup B$ consists of all elements that belong to exactly one of the sets $A$ and $B$:
$A\bigtriangleup B = (A \setminus B) \cup (B \setminus A) = (A \cup B) \setminus (A \cap B)$.

By $\{a, b, c\}$ we denote the set that contains $a, b, c$ and no other elements. Some of the elements $a, b, c$ may coincide; it this case $\{a, b, c\}$ consists of one or two elements. This notation is also used in a less formal way. For example, the set of all elements of a sequence $a_{1}, a_{2},\ldots, $ is denoted by $\{a_{1}, a_{2},\ldots \}$ (and sometimes even $\{a_{i}\}$). More pedantic notation would be $\{a_{i} \mid i \in $$\mathcal{N}$$ \}$,
Where $ $$\mathcal{N}$$ $ is the set of all natural numbers $($$\mathcal{N}$$ = \{1, 2, . . . \})$

Venn Diagrams:




Real Intervals

By an interval we mean an uninterrupted stretch of the real line. There are a number of different kinds of interval, for which there is a fairly widespread standard notation.

Let $a, b \in  $$\mathcal{R}$$, a < b$ The open interval $(a, b)$ is the set $(a, b) = \{x \in $$\mathcal{R}$$  \mid a < x < b\}$

The closed interval $[a, b]$ is the set $[a, b] = \{x \in $$\mathcal{R}$$ \mid a  \leq x \leq b \}$

We call $[a, b) = \{x \in $$\mathcal{R}$$ \mid a \leq x < b\}$ a left-closed, right-open interval, and
$(a, b] = \{x \in $$\mathcal{R}$$ \mid a < x \leq b\}$ a left-open, right-closed interval.

Both $[a, b)$ and $(a, b]$ are sometimes referred to as half-open (or half-closed) intervals.
And  we set
$(-\infty, a) = \{x \in $$\mathcal{R}$$ \mid x < a\}$
$(-\infty, a] = \{x \in $$\mathcal{R}$$ | x \leq a\}$
$(a,\infty) = \{x \in $$\mathcal{R}$$ | x > a\}$
$[a,\infty) = \{x \in $$\mathcal{R}$$ | x \geq a\}$


*********
Back to Basic Mathematics

Monday, 1 June 2015

Determinants

Dear Student, after a discussion on Matrices , I would like to post the notes for Determinants here.

Definition: The determinant of a $1 × 1$ matrix $A$ = $(a)$ is the number $a$ itself.

The determinant of a $2 \times 2$ matrix  $A = \begin{pmatrix}a_{11}&a_{12}\\a_{21}&a_{22} \end{pmatrix}$ is 
$\text{det}(A)=|A|=$   \begin{vmatrix}a_{11}&a_{12}\\a_{21}&a_{22} \end{vmatrix} $=a_{11}a_{22}-a_{12}a_{21}$

The determinant of $3 \times 3$ matrix 
$A = \begin{pmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33} \end{pmatrix}$ is the quantity

$\text{det}(A)= $ \begin{vmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33} \end{vmatrix} 

$=a_{11}a_{22}a_{33}+ a_{12}a_{23}a_{31}+a_{13}a_{21}a_{32}-a_{11}a_{23}a_{32}-a_{12}a_{21}a_{33}-a_{13}a_{22}a_{31}$

Although a determinant, strictly speaking, is a single number, the word "determinant" is occasionally used to refer to the matrix that gave rise to it. Thus, we might refer to the element 7 in the determinant  $\begin{vmatrix}1& 7\\8&0\end{vmatrix}$ meaning, of course, the element 7 in the matrix $\begin{pmatrix}1& 7\\8&0\end{pmatrix}$. We shall also speak of $3 \times 3$ determinants, or a third order determinant, meaning the determinants arising from $3 \times 3$ matrices.
Evaluating $3 \times 3$ Determinant: Consider

$\text{det}(A)=$ $\begin{vmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33} \end{vmatrix} =a_{11}a_{22}a_{33}+ a_{12}a_{23}a_{31}+a_{13}a_{21}a_{32}-a_{11}a_{23}a_{32}-a_{12}a_{21}a_{33}-a_{13}a_{22}a_{31}$

We get 
$a_{11}a_{22}a_{33}+ a_{12}a_{23}a_{31}+a_{13}a_{21}a_{32}-a_{11}a_{23}a_{32}-a_{12}a_{21}a_{33}-a_{13}a_{22}a_{31}$
$=(a_{11}a_{22}a_{33}-a_{11}a_{23}a_{32})-(a_{12}a_{21}a_{33}-a_{12}a_{23}a_{31})+(a_{13}a_{21}a_{32}-a_{13}a_{22}a_{31})$
$=a_{11}(a_{22}a_{33}-a_{23}a_{32})-a_{12}(a_{21}a_{33}-a_{23}a_{31})+a_{13}(a_{21}a_{32}-a_{22}a_{31})$

$=a_{11}\begin{vmatrix} a_{22}&a_{23}\\a_{32}&a_{33}\end{vmatrix} -a_{12}\begin{vmatrix} a_{21}&a_{23}\\a_{31}&a_{33}\end{vmatrix} +a_{13}\begin{vmatrix} a_{21}&a_{22}\\a_{31}&a_{32}\end{vmatrix}$


The above expression is called expansion by the elements of first row of matrix $A$. The sum of the products of the elements by the $2 \times 2$ determinants thus formed, and each element provided with a proper sign, yields the $3 \times 3$ determinant. This is a general rule, and it works for any row or column.

The proper sign is given by this checkerboard of signs: $\begin{matrix} +&-&+\\-&+&-\\+&-&+\end{matrix}$
For example, the sign in the $(1, 1)$ position is $+$. To show a further example of how this works, we shall expand a $3 \times 3$ determinant by the elements of its second row:
$\text{det}(A)=$ $\begin{vmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33} \end{vmatrix} = -a_{21}\begin{vmatrix} a_{12}&a_{13}\\a_{32}&a_{33}\end{vmatrix} +a_{22}\begin{vmatrix} a_{11}&a_{13}\\a_{31}&a_{33}\end{vmatrix} -a_{23}\begin{vmatrix} a_{11}&a_{12}\\a_{31}&a_{32}\end{vmatrix}$

we shall expand a $3 \times 3$ determinant by the elements of  third row:
$\text{det}(A)=$ $\begin{vmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33} \end{vmatrix} = a_{31}\begin{vmatrix} a_{12}&a_{13}\\a_{22}&a_{23}\end{vmatrix} -a_{32}\begin{vmatrix} a_{11}&a_{13}\\a_{21}&a_{23}\end{vmatrix} +a_{33}\begin{vmatrix} a_{11}&a_{12}\\a_{21}&a_{22}\end{vmatrix}$

Exercise:
  1. Find 
    1. $\begin{vmatrix} 6&3\\9&4 \end{vmatrix}$
    2. $\begin{vmatrix} 2&-1\\0&3 \end{vmatrix}$
    3. $\begin{vmatrix} x&3\\y&z \end{vmatrix}$
    4. $\begin{vmatrix}1&2\\4&8  \end{vmatrix}$
    5. $\begin{vmatrix}x&z+1\\x+2&z+3 \end{vmatrix}$
  2. Expand $\begin{vmatrix} 1&2&1\\4&1&-4\\0&1&2 \end{vmatrix}$ by the elements of first column.
  3. Show that $\begin{vmatrix} 1&2\\3&4\end{vmatrix} \times \begin{vmatrix} 5&6\\7&8\end{vmatrix}=4$
  4. Show that $\begin{vmatrix} 1&2&4\\0&1&1\\1&1&1\end{vmatrix}=-2$, $\begin{vmatrix} 1&1&0\\0&1&1\\0&0&1\end{vmatrix}=1$ and $\begin{vmatrix} 1&0&2\\1&2&5\\6&8&0\end{vmatrix}=-48$
  5. Solve for $x$: $\begin{vmatrix}x&2\\1&3\end{vmatrix}=2$, $\begin{vmatrix}x&1\\0&x\end{vmatrix}=4$,$\begin{vmatrix}x&1&1\\0&x&1\\0&0&x\end{vmatrix}=8$
Properties of $n \times n$ determinants:
(1) $\text{det}(A) = \text{det} (A^{\prime})$.
(2) If $B$ results from $A$ by interchanging a pair of rows or columns, $\text{det}(B) = - \text{det}(A)$.
(3) If $B$ results from $A$ by multiplying the elements of a row or column by a factor $k$ then $\text{det}(B) = k \text{det}(A)$.
(4) If two rows (or columns) of $A$ are identical or proportional, then $\text{det}(A) = 0$.
(5) If a row (or a column) of $A$ is identically 0, (that is, all the elements are zcro), then $\text{det}(A) = 0$
(6) If the $i^{th}$ row (or column) of $B$ equals the $i^{th}$ row (or column) of $A$ plus a multiple of the $j^{th}$ row (or column) of $A$ ­ and otherwise $B$ and $A$ are identical, then $\text{det}(B) = \text{det}(A)$. (Here $i \ne­ j$).
(7) If $I$ is the identity matrix, then $\text{det} I = 1$.
(8) If matrix $D$ is diagonal matrix $D=\begin{pmatrix}a_{11}&0&0\\0&a_{22}&0\\0&0&a_{33}\end{pmatrix}$ then $|D| =a_{11}\times a_{22} \times a_{33}$

Occasionally it is convenient to evaluate a determinant by making use of Property (6) to reduce a row or column to as many zeros as possible and then to expand by the elements of that row or column.
Here is how it works:
Given a matrix  $D=\begin{pmatrix}1&1&6\\2&1&3\\4&2&2\end{pmatrix}$ to find $|D|=\begin{vmatrix}1&1&6\\2&1&3\\4&2&2\end{vmatrix}$
Subtract first row from second row, by property (6) we get  $|D|=\begin{vmatrix}1&1&6\\1&0&-3\\4&2&2\end{vmatrix}$
Multiply first row by -2 and add to third row, by property (6) we get 
$|D|=\begin{vmatrix}1&1&6\\1&0&-3\\2&0&-10\end{vmatrix}$

Now expand by second column we get

$|D|=-1\times \begin{vmatrix}1&-3\\2&-10\end{vmatrix}+0\times \begin{vmatrix}1&6\\2&-10\end{vmatrix}-0\times \begin{vmatrix}1&6\\1&-3\end{vmatrix}$

$|D|=-1\times (1\times -10-2\times -3)+0-0$

$|D| = -1\times -4 = 4$

Exercise: Evaluate the following determinants by making use of property (6)
  1. $\begin{vmatrix}1&2&6\\3&0&1\\1&1&2\end{vmatrix}$
  2. $\begin{vmatrix}2&1&2\\4&1&3\\6&3&1\end{vmatrix}$
  3. $\begin{vmatrix}2&2&1\\1&2&2\\2&1&2\end{vmatrix}$

DETERMINANTS, MATRICES AND MULTIPLICATION
If $A$ and $B$ are two $n \times n$ matrices then $\text{det}(AB)=\text{det}(A) \times \text{det}(B)$ or using alternative symbol $|AB| = |A| \times |B|$

Exercise: Check the law of multiplication of determinants in following cases
  1. $A= \begin{vmatrix}3&1\\2&1\end{vmatrix}$, $B=\begin{vmatrix}1&-4\\2&6\end{vmatrix}$
  2. $A= \begin{vmatrix}2&9&1\\6&0&3\\1&1&0\end{vmatrix}$, $B=\begin{vmatrix}1&0&0\\0&1&0\\0&0&2\end{vmatrix}$
Definition: MINOR
Given an $n \times n$ matrix $A = (a_{ij})$, $i=1,2,\ldots, n$, $j=1,2,\ldots, n$ the minor of the element $a_{ij}$ is the determinant of the $(n-1) \times(n-1)$ matrix that results when the $i^{th}$ row and $j^{th}$ column of $A$ are deleted. If $M_{ij}$ is the resultant matrix then, minor of  $a_{ij}$ is $|M_{ij}|$

Example: If $A= \begin{pmatrix}3&0&6\\9&1&1\\2&0&-5\end{pmatrix}$, then 
$M_{22} =\begin{pmatrix}3&6\\2&-5\end{pmatrix}$ $\therefore$ $|M_{22}|=3\times-5 -2\times 6 = -27$
$M_{12} =\begin{pmatrix}9&1\\2&-5\end{pmatrix}$ $\therefore$ $|M_{12}|=9\times-5 -1\times 2 = -47$
The minor of element $a_{22}=1$ is $-27$ and minor of element $a_{12} =0$ is $-47$

Example: if  $A= \begin{pmatrix}2&3\\1&-4\end{pmatrix}$, then
$M_{12}=(1)_{1\times 1}$, $\therefore$ $|M_{12}| = 1$
$M_{22}=(2)_{1\times 1}$, $\therefore$ $|M_{22}| = 2$
The minor of element $a_{12}=3$ is $1$ and minor of element $a_{22} =-4$ is $2$

Definition: COFACTOR
 Given an $n \times n$ matrix $A=(a_{ij})$,$i=1,2,\ldots, n$, $j=1,2,\ldots, n$  the cofactor $c_{ij}$  of the element $a_{ij}$ is defined by $c_{ij} = (-1)^{i+j}\times \text{Minor of }a_{ij} = (-1)^{i+j}\times |M_{ij}|$
Where $M_{ij}$ is the $(n-1)\times(n-1)$ matrix, the results when the $i^{th}$ row and $j^{th}$ column of $A$ are deleted

Example: If $A= \begin{pmatrix}3&0&6\\9&1&1\\2&0&-5\end{pmatrix}$, then 
$M_{22} =\begin{pmatrix}3&6\\2&-5\end{pmatrix}$ $\therefore$ $|M_{22}|=3\times-5 -2\times 6 = -27$ Then $c_{22} = (-1)^{2+2} \times -27 = -27$
$M_{12} =\begin{pmatrix}9&1\\2&-5\end{pmatrix}$ $\therefore$ $|M_{12}|=9\times-5 -1\times 2 = -47$ Then $c_{12} = (-1)^{1+2} \times -47 = 47$

Example: if  $A= \begin{pmatrix}2&3\\1&-4\end{pmatrix}$, then
$M_{12}=(1)_{1\times 1}$, $\therefore$ $|M_{12}| = 1$ Then $c_{12} = (-1)^{1+2} \times 1 = -1$
$M_{22}=(2)_{1\times 1}$, $\therefore$ $|M_{22}| = 2$ Then $c_{22} = (-1)^{2+2} \times 2 =  2$

COFACTOR EXPANSION

The expansion of a $3 \times 3$ determinant according to the elements of a row or column can be formulated in this way.
If $\begin{pmatrix} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33}\end{pmatrix}$
then   $|A| = \begin{vmatrix} a_{11}& a_{12}& a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33}\end{vmatrix}$

Determinant $|A|$                                                     Expansion by the element of 
$|A| = a_{11}c_{11}+a_{12}c_{12}+a_{13}c_{13}$                           First Row
$|A| = a_{21}c_{21}+a_{22}c_{22}+a_{23}c_{23}$                           Second Row
$|A| = a_{31}c_{31}+a_{32}c_{32}+a_{33}c_{33}$                           Third Row

Determinant $|A|$                                                     Expansion by the element of 
$|A| = a_{11}c_{11}+a_{21}c_{21}+a_{31}c_{31}$                           First Column
$|A| = a_{12}c_{12}+a_{22}c_{22}+a_{32}c_{32}$                           Second Column
$|A| = a_{13}c_{13}+a_{23}c_{23}+a_{33}c_{33}$                           Third Column

Definition: INVERSE OF MATRIX
The matrix $A=\begin{pmatrix} a_{11}&a_{12}&a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33}\end{pmatrix}$ has an inverse if and only if $|A| = \begin{vmatrix} a_{11}& a_{12}& a_{13}\\ a_{21}&a_{22}&a_{23}\\ a_{31}&a_{32}&a_{33}\end{vmatrix} \ne 0$

The inverse if given by 
$A^{-1} = \text{Inv}(A) = \dfrac{1}{|A|} \begin{pmatrix} c_{11}&c_{12}&c_{13}\\ c_{21}&c_{22}&c_{23}\\ c_{31}&c_{32}&c_{33}\end{pmatrix}$ the quantities $c_{ij}$ are cofactor of $a_{ij}$

The matrix $\begin{pmatrix} c_{11}&c_{12}&c_{13}\\ c_{21}&c_{22}&c_{23}\\ c_{31}&c_{32}&c_{33}\end{pmatrix}$ is called an Adjoint matrix of matrix $A$. Therefore $A^{-1} = \text{Inv}(A) = \dfrac{\text{Adj}(A)}{|A|}$

The matrix $\begin{pmatrix} a_{11}&a_{12}\\ a_{21}&a_{22}\end{pmatrix}$ has inverse if and only if $|A| = a_{11}a_{22}-a_{21}a_{12}\ne 0$ and the inverse is given by the formula $A^{-1} = \text{Inv}(A) =\dfrac{1}{a_{11}a_{22}-a_{21}a_{12}}\begin{pmatrix} a_{22}&-a_{12}\\ -a_{21}&a_{11}\end{pmatrix}$

Given a square matrix $A$, a second square matrix $B$ (of the same order)    is called an inverse of $A$ if the following equations both hold:
$AB = I$ and $BA = I$
Note that,
(a)    If a matrix $A$ has an inverse $B$, then the matrix $B$ has an inverse $A$.
(b)  The unit matrix $I$ is its own inverse. $I × I = I$

Exercise
  1. Verify that $ \begin{pmatrix}-6&7\\7&-8\end{pmatrix}$ is the inverse of $ \begin{pmatrix}8&7\\7&6\end{pmatrix}$
  2. Verify that $ \begin{pmatrix}-1/3&0\\0&5\end{pmatrix}$ is the inverse of $ \begin{pmatrix}3&0\\0&1/5\end{pmatrix}$
  3. Find the inverse of $ \begin{pmatrix}5&3\\3&2\end{pmatrix}$
  4. Find the inverse of $A= \begin{pmatrix}0&1&0\\1&0&0\\0&0&1\end{pmatrix}$
  5. Find the inverse of matrix D, where $D =\begin{pmatrix}1&1&6\\2&1&3\\4&2&2\end{pmatrix} $

 INVERSE MATRIX OF SPECIAL MATRICES

      If  $D$ is diagonal matrix $D=\begin{pmatrix}a_{11}&0&0\\0&a_{22}&0\\0&0&a_{33}\end{pmatrix}$ and if $a_{ii} \ne 0$, for $i=1,2,3$  then $D^{-1} = \begin{pmatrix}\dfrac{1}{a_{11}}&0&0\\0&\dfrac{1}{a_{22}}&0\\0&0&\dfrac{1}{a_{33}}\end{pmatrix}$

If a matrix is upper triangular or lower triangular, then it is not too difficult to compute its inverse.  The inverse will also be upper triangular or lower triangular.
        
      Definition: SINGULAR MATRIX
     An n×n matrix $A = (a_{ij})$,$i=1,2,\ldots, n$, $j=1,2,\ldots, n$  is called singular matrix if     $|A|=0$   otherwise it is called nonsingular.

      Exercise:
Which of the following matrices are singular and which are nonsingular?
$A= \begin{pmatrix}1&1\\2&3\end{pmatrix}$,$B= \begin{pmatrix}1&2\\5&8\end{pmatrix}$,$C= \begin{pmatrix}-1&6\\3&9\end{pmatrix}$,$D= \begin{pmatrix}0&0\\0&1\end{pmatrix}$,$E= \begin{pmatrix}2&3\\4&5\end{pmatrix}$

ALGEBRA OF INVERSE

  1. If matrix $A$ has an inverse, then $A^{-1}$  has an inverse and $(A^{-1})^{-1} = A$
  2. If matrix $A$ has an inverse and $k$ is a constant that is different from zero, then $kA$ has an inverse and $(kA)^{-1} = k^{-1} A^{-1} = \dfrac{1}{k}A^{-1}$
  3. If matrices $A$ and $B$ has inverse, so does $AB$ and $(AB)^{-1}=B^{-1} A^{-1}$ This says that the inverse of the product is the product of the inverses, taken in reverse order. The reversal of order is important to keep in mind.
  4. If the matrices $A_{1},A_{2},\ldots, A_{m}$ all have inverses, so does the product $A_{1}\times A_{2}\times,\ldots, \times A_{m}$ and $(A_{1}\times A_{2}\times,\ldots, \times A_{m})^{-1}=A_{m}^{-1}\times A_{m-1}^{-1}\times,\ldots, \times A_{1}^{-1}$
  5. If matrix $A$ has an inverse, so does $A^{\prime}$  and $(A^{\prime})^{-1} = (A^{-1})^{\prime}$
  6. if matrix $A$ is non- singular then $|A^{-1}| = \dfrac{1}{|A|}$
Exercise:
If $A= \begin{pmatrix}1&6\\2&1\end{pmatrix}$, $B= \begin{pmatrix}1&1\\3&2\end{pmatrix}$ then prove by direct computation,
  1. $(AB)^{-1}=B^{-1} A^{-1}$
  2. $(A^{\prime})^{-1} = (A^{-1})^{\prime}$
  3. $(A^{-1})^{-1} = A$
Back to Basic Mathematics
********************





   
    





Saturday, 30 May 2015

Basics of Matrices

Dear Student, you can find here the Matrix Theory and Exercises (basics) as per lecture planning.


A matrix that has $m$ rows and $n$ columns is called an $m \times n$ matrix (read: m by n). In the tag, "$m \times n$" the number of rows is always specified first, and the number of columns second. The tag $m \times n$ is called the order of the matrix.

 The typical element of matrix $A={{\left( \begin{matrix} {{a}_{11}} & \ldots & {{a}_{1n}} \\ \vdots & \ddots & \vdots \\ {{a}_{m1}} & \cdots & {{a}_{mn}} \\ \end{matrix} \right)}_{m\times n}}$ are denoted by \[{{a}_{ij}},\text{ }i=1,2,\ldots ,m\text{ and }j=1,2,\ldots ,n\text{ }\] The $i^{th}$ row of matrix $A$ is ${{A}_{i}}={{\left( {{a}_{i1}},{{a}_{i2}},\ldots ,{{a}_{in}} \right)}_{1\times n}}$, the $j^{th}$ column of matrix $A$ is ${{B}_{j}}={{\left( \begin{matrix} {{a}_{1j}} \\ {{a}_{2j}} \\ {{a}_{3j}} \\ \vdots \\ {{a}_{mj}} \\ \end{matrix} \right)}_{m\times 1}}$
Exercise:

Construct an $m \times n$ matrix whose elements ${{a}_{ij}}$are given by
  1.  $a_{ij}=1$,$i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 2, n = 2$
  2. $a_{ij}=0$, if $i=j$, $a_{ij}=1$ if $i \ne j$, $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 3, n = 3$
  3. $a_{ij}=i+j$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 3, n = 3$
  4. $a_{ij}=i \times j$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 3, n = 3$
  5. $a_{ij}= $  minimum of  $i$ and $j$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 3, n = 3$
  6. $a_{ij}=(i-j)^{2}$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 2, n = 2$
  7. $a_{ij}=i^{2} \times j+ j^{2} \times i$,  $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ for $m = 2, n = 2$
Equality of two matrices:
Definition: If $A$ is an $m \times n$ matrix with elements \[{{a}_{ij}},\text{ }i=1,2,\ldots ,m\text{ and }j=1,2,\ldots ,n\text{ }\] and $B$ is a $p \times q$ matrix with elements \[{{b}_{ij}},\text{ }i=1,2,\ldots ,p\text{ and }j=1,2,\ldots ,q\text{ }\]then we shall write $A = B$ if and only if
$m = p, n = q$ and ${{a}_{ij}}={{b}_{ij}},$\[i=1,2,\ldots ,m\text{ and }j=1,2,\ldots ,n\text{ }\]
The equality sign" = " when written between two matrices is essentially a new symbol, and one should note that it behaves in the same way as does the ordinary equality relating ordinary numbers. That is to say, matrix equality has these three properties:
1. It is reflexive. This means that for any matrix $A, A = A$.
2. It is symmetric. This means that if $A = B$, then $B = A$.
3. It is transitive. This means that if $A, B$ and $C$ are matrices, then $A = B$, and $B = C$ together imply that $A = C$.

Exercise
Which of the following statements are true? (1-3)
  1. $(0,0)=(0,0,0)$
  2. $(0-0,0)=(0-0,0-0)$
  3. $\begin{pmatrix}1 - 1 & 2 - 2\\ x -x & 1 - 1\end{pmatrix}=(0)$
  4. If $ \begin{pmatrix} x & 2x+y \\ x +z & 2y+ w \end{pmatrix} = \begin{pmatrix} 6 & 2\\ 4 & 3\end{pmatrix}$ find values of $x,y,z$ and $w$
The transpose of matrix:
If $A$ is an $m \times n$ matrix, the transpose of matrix $A$ denoted by $A^{\prime}$ is an $n \times m$ matrix.
If $A = (a_{ij})$, $i=1,2,\ldots ,m$  and  $j=1,2,\ldots ,n $ and $A^{\prime}=  (b_{kl})$, $k=1,2,\ldots ,n$  and  $l=1,2,\ldots ,m $  then $b_{kl} = a_{ji}$
If $A^{\prime} = A$ (i.e. $b_{ij}=a_{ij}$,  $i=1,2,\ldots ,n$  and  $j=1,2,\ldots ,n $) the matrix $A$ is called symmetric matrix.
If $A^{\prime} = -A$  (i.e. $m = n$ and  $b_{ij}=-a_{ij}$,  $i=1,2,\ldots ,n$  and  $j=1,2,\ldots ,n $) the matrix $A$ is called skew -symmetric matrix.

Exercise:

  1. If $A = \begin{pmatrix}2&1\\3&4\\5&6\end{pmatrix}$, construct $A^{\prime}$
  2. If $A = \begin{pmatrix}2&1&6&9&4\end{pmatrix}$, construct $A^{\prime}$
  3. If $A = \begin{pmatrix}1&2&x\\y&3&6\\4&z&0\end{pmatrix}$, construct $A^{\prime}$
  4. Which of following Matrices are symmetric?
    1. $A = \begin{pmatrix}1&2&3\\2&4&6\\3&6&5\end{pmatrix}$
    2. $B = \begin{pmatrix}-1&3&-1\\2&4&2\\-1&2&0\end{pmatrix}$
    3. $C = \begin{pmatrix}-1&6&3\\2&-1&4\\3&2&1\end{pmatrix}$
    4. $D = \begin{pmatrix}0&5&2\\5&6&4\\2&4&-7\end{pmatrix}$
  5. Which of following Matrices are skew -symmetric?
    1. $A = \begin{pmatrix}0&6&7\\-6&0&8\\-7&-8&0\end{pmatrix}$
    2. $B = \begin{pmatrix}0&1&-1\\1&0&2\\1&2&0\end{pmatrix}$
    3. $C = \begin{pmatrix}0&3&4\\-3&1&-7\\-4&7&2\end{pmatrix}$
    4. $D = \begin{pmatrix}0&5&1\\-5&0&2\\-1&-2&0\end{pmatrix}$
The ZERO Matrix:
This is a matrix whose elements are all zero. It is designated by O

$O = \begin{pmatrix}0&0&\ldots 0\\\vdots&\ddots&\vdots \\0&0&\ldots 0\end{pmatrix}$
That is $O = (a_{ij})$ then $a_{ij}=0$, $i=1,2\ldots m$, and $j=1,2,\ldots n$

The DIAGONAL Matrix:
These are square matrices in which the elements that are not on principal diagonal are all zero.  That is $A = (a_{ij})$, $a_{ij} = 0$, $i \ne j$, $i=1,2\ldots n$, and $j=1,2,\ldots n$. We can write $A = \text{diag} \begin{pmatrix} a_{11}&a_{22}&\ldots a_{nn}\end{pmatrix}$

The UNIT Matrix:
This is a square matrix with 1's on principal diagonal and 0's elewhere. It is  designated by I. We have

$I = \begin{pmatrix}1&0&\ldots 0\\0&1&\ldots 0\\ \vdots&\ddots&\vdots \\0&0&\ldots 1\end{pmatrix}$
That is $I = (a_{ij})$ then $a_{ij}=1$, if $i=j$, $a_{ij}=0$, if $i \ne j$, $i=1,2\ldots n$, and $j=1,2,\ldots n$


The TRIANGULAR Matrix:
An upper triangular matrix is a square matrix all of whose nonzero elements are located on or above the principal diagonal. A lower triangular matrix is a square matrix all of whose nonzero elements are located on or below the principal diagonal. In other words, an upper triangular matrix has all zeros below its main diagonal, where as a lower triangular matrix has all zeros above its main diagonal.
That is $A = (a_{ij})$,


$a_{ij}=0$, if  $i>j$,$i=1,2,\ldots, n$, $j=1,2,\ldots,n$, then matrix $A$ is upper triangular

$a_{ij}=0$, if $i  < j$, $i=1,2,\ldots, n$, $j=1,2,\ldots,n$, then matrix $A$ is lower triangular

ADDITION OF TWO MATRICES
Definition: Two $m \times n$ matrices $A=(a_{ij})$ and $B=(b_{ij})$, $i=1,2,\ldots, m$, $j=1,2,\ldots, n$ are added by adding corresponding elements. The expressions $A+B$ will designate the $m \times n$ matrix whose elements are $a_{ij}+b_{ij}$. Once again
$(a_{ij}+b_{ij})=(a_{ij})+b_{ij})$

Theorem:

  1. Matrix addition is commutative. That is for any two matrices $A$ and $B$ conformable  for addition $A+B=B+A$
  2. Matrix addition is associative. That is for any three matrices $A,B$ and $C$  that are conformable for addition,$(A+B)+C=A+(B+C)$
  3. If $A$ is an $m \times n$ matrix, and $O$ is the $m \times n$ zero matrix,then $A+O=O+A$
SUBTRACTION OF TWO MATRICES
If $A=(a_{ij})$ is an $m \times n$ matrix, then its negative, designated by $-A$, is the $m \times n$ matrix whose elements are $-a_{ij}$. By the difference $A - B$, we shall mean the matrix $A+(-B)$, that is  to say, $A=(a_{ij})$ and $B=(b_{ij})$, $i=1,2,\ldots, m$, $j=1,2,\ldots, n$ then
$A-B=(a_{ij}-b_{ij})$, $i=1,2,\ldots, m$, $j=1,2,\ldots, n$

Theorem: For any matrix $A$

  1. $-O=O$
  2. $A-A=A+(-A)$
  3. $-(-A)=A$
SCALAR MULTIPLICATION
Definition:

If $A=(a_{ij})$ is an $m \times n$ matrix $i=1,2,\ldots, m$, $j=1,2,\ldots, n$, then $cA$ will designate a scalar product of $A$ by $c$. It is $m \times n$ matrix $i=1,2,\ldots, m$, $j=1,2,\ldots, n$, whose elements are $c \times a_{ij}$. In other words, $cA = (c \times a_{ij})$


Theorem: Let $A$ and $B$ be two $m \times n$ matrices, and let $a$ and $b$ are ordinary numbers (scalar) Then,
  1. $a(bA)=(ab)A$
  2. $(a+b)A=aA+bB$
  3. $a(A+B)= aA+aB$
  4. $(1)A=A$
  5. $(-1)A=-A$
  6. $aO=O$
  7. $OA=O$
Exercise:

  1. If $A=\begin{pmatrix}1 & 2 \\ 3 & -4 \end{pmatrix}$, $B=\begin{pmatrix}2 & -7\\5 & 8 \end{pmatrix}$ and $C=\begin{pmatrix}1 & 5\\0 & 2\end{pmatrix}$ Find $A + B - C$
  2. If $A=\begin{pmatrix}2 & 3 \\ -1 & 4\\1 & 0 \end{pmatrix}$, $B=\begin{pmatrix}-1 & 2\\3 & 1\\5&4 \end{pmatrix}$ and $C=\begin{pmatrix}2 & -1\\2 & 3\\-4&1\end{pmatrix}$ Find  $A$$ -B +2C$
MATRIX MULTIPLICATION
Definition: Let $A$ and $B$ be $1 \times n$ or $n \times 1$ matrices. $A$ has elements $a_{1},a_{2},\ldots, n$ and B has elements $b_{1},b_{2},\ldots, n$ The inner product of A and B is given by the formula $A \cdot B=a_{1}b_{1}+a_{2}b_{2}+\cdots +a_{n}b_{n}$

Exercise:
 If $A = (1, 1, 1)$, $B = (3, 1, 4)$, $C = (0, 1, 2)$, compute the quantities $A \cdot A$, $A \cdot B$, $A \cdot C$, $(A - B) \cdot (A + B)$, $(2A) \cdot (3B)$, $A\cdot (B + C)$,
$(A + B) \cdot C$, $(A - B) \cdot (C - B)$, $(A + 2B + C) \cdot (A + B + 2C)$.

Two matrices are conformable for multiplication when the number of columns of the first factor equals the number of rows of the second factor. The orders of two matrices $A$ and $B$ that are conformable for multiplication can be written as $ m \times n$ and $n \times p$ respectively.


Designate the $m$ rows of $A$ by $A_{1},A_{2},\ldots ,A_{m}$  (Consider them as row vectors.) Designate the $p$ columns of $B$ by $B_{1},B_{2},\ldots,B_{p}$ (Consider them as column vectors.) These vectors all have $n$ elements (because the number of columns of $A$ is $n$ and the number of rows of $B$ is also $n$). For each integer $i$ between $1$ and $m$, inclusive, and for each integer $j$ between $1$ and $p$, inclusive, the inner product $A_{i} \cdot B_{j}$ can therefore be formed. This number will be the element $c_{ij}$in the  $(i,j)^{th}$ position of the product $C = AB$.

Definition: If $A$ is an $m \times n$ matrix with rows $A_{1},A_{2},\ldots ,A_{m}$ and $B$ is an $n \times p$ matrix with columns $B_{1},B_{2},\ldots,B_{p}$, then the product $AB$ is an $m \times p$  matrix $C$ whose elements $c_{ij}$ are given by the formula $c_{ij}=A_{i} \cdot B_{j}$

We may also write $C = AB =$  $\begin{pmatrix}A_{1}\cdot B_{1} &A_{1}\cdot B_{2}& \ldots A_{1}\cdot B_{p}\\ A_{2}\cdot B_{1} &A_{2}\cdot B_{2} & \ldots A_{2}\cdot B_{p}\\ \vdots &\vdots & \vdots\\ A_{m}\cdot B_{1} &A_{m}\cdot B_{2}& \ldots A_{m}\cdot B_{p} \end{pmatrix}$

Exercise:
  1. Find elements $c_{22},c_{32},c_{23},c_{33}$ in the product $C=AB$ where, $A = \begin{pmatrix} 2 & 3 & 4\\1 & 2 & 3\\-1&1&2\end{pmatrix}$, $B=\begin{pmatrix} 1&3 &0\\-1 & 2 & 1\\0 & 0 & 2\end{pmatrix}$
  2. Given $A = \begin{pmatrix} 1 & 1 & -1\\2 & -3 & 4\\3&-2&3\end{pmatrix}$, $B=\begin{pmatrix} -1&-2 &-1\\6 & 12 & 6\\5 & 10 & 4\end{pmatrix}$, $C = \begin{pmatrix}-1 & -1 & 1\\2 & 2 &-2\\-3&-3&3 \end{pmatrix}$ Find 
    1. $AB$
    2. $BA$
    3. $AC$
    4. $CA$
  3. For the following pair of matrices compute $AB$ and $BA$ whichever exist.
    1. $A=\begin{pmatrix}1&2&3&4&5\\6&7&8&0&3\\6&-3&4&-2&1 \end{pmatrix}$, $B = \begin{pmatrix} 1 & 2\\3 & 4\\5 & 6\\6 & 5\\7 & 0\end{pmatrix}$
    2. $A=\begin{pmatrix} 2&3&4&5\end{pmatrix}$, $B=\begin{pmatrix} 1&2&3&4\end{pmatrix}$
    3. $A=\begin{pmatrix} 0&1&2\\1 &2&0\end{pmatrix}$,$B=\begin{pmatrix} 0&1\\-1 & 0\\0 & 1\end{pmatrix}$
    4. $A= \begin{pmatrix}1 & 2\\2 & 3\\3 & 4 \end{pmatrix}$, $B = \begin{pmatrix} 3 & -2 & 1\\0 & 1 & -2\\3& -4 & 5\end{pmatrix}$
    5. $A=\text{diag}\begin{pmatrix}\lambda_{1}&\lambda_{2}&\lambda_{3}&\lambda_{4} \end{pmatrix}$ $B =\text{diag}\begin{pmatrix}\mu_{1}&\mu_{2}&\mu_{3}&\mu_{4} \end{pmatrix}$
  4. Multiply 
    1. $\begin{pmatrix} 1 & 6 & 1\\0& 1 & 2\\ 0& 0 & 1\end{pmatrix}$$\begin{pmatrix} x\\y\\z\end{pmatrix}$
    2. $\begin{pmatrix} 1 & 0 & 0\\0& 4 & 0\\ 0& 0 & 5\end{pmatrix}$$\begin{pmatrix} x\\y\\z\end{pmatrix}$
    3. $\begin{pmatrix}1 & 4 & 3 & 2 \end{pmatrix}$ $\begin{pmatrix} x\\y\\z\\w\end{pmatrix}$
There are two types of matrix multiplication: in the product $AB$, $B$ is said to be premulliplied by $A$ or to be multiplied by $A$ on the left, while in the product $BA$, $B$ is said to be postmultiplied by $A$ or to be multiplied by $A$ on the right. Two matrices $A$ and $B$ for which $AB = BA$ are said to commute with one another.

Exercise:
  1. Do the matrices $\begin{pmatrix} 1&2&1\\2&1&1\\2&-1&1\end{pmatrix}$ and $\begin{pmatrix}1&1&1\\1&-1&1\\-1&1&1 \end{pmatrix}$ commute?
  2. If the matrix $\begin{pmatrix} 1&2\\3&0\end{pmatrix}$ commutes with matrix $\begin{pmatrix} a&b\\c&d\end{pmatrix}$  what must be the relationship among the quantities $a$, $b$, $c$ and $d$?

TheoremIf $A$, $B$, and $C$, are matrices; if $I$ is the unit matrix and $O$ is the zero matrix, then, with proper attention paid to conformability, we have,
  1. $(AB)C = A(BC)$ the associative law;
  2. $(A + B)C = AC + BC$ the distributive laws;
  3. $A(B + C) = AB + AC$ the distributive laws;
  4. $OA = AO = O$ multiplication by zero;
  5. $AI = IA = A$ multiplication by the unit.


Corollary: If a and b are scalars and if $A$ and $B$ are conformable for matrix multiplication, then $(aA)(bB)=ab(AB)$
Exercise: Verify the two distributive laws numerically with selection 
  1. $A = \begin{pmatrix}1&2\\3 & 4 \end{pmatrix}$, $B = \begin{pmatrix}1&0\\2 & 3 \end{pmatrix}$ and $C = \begin{pmatrix}1&-1\\0 & 1 \end{pmatrix}$
  2. $A = \begin{pmatrix}1&-1\\2 & 0 \end{pmatrix}$, $B = \begin{pmatrix}0&4\\1 & 2 \end{pmatrix}$ and $C = \begin{pmatrix}1&1\\1& 1 \end{pmatrix}$
Theorem: If $A$ and $B$ are conformable for multiplication, then $(AB)^{\prime}=(B^{\prime}A^{\prime})$
Corollary: For matrices $A,B,C,D$  we can write $(ABCD)^{\prime}=(D^{\prime}C^{\prime}B^{\prime}A^{\prime})$. In words: the transpose of the product of any number of matrices is equal to the product of the transposes of the individual matrices formed in the reverse order.

Exercise: If $A = \begin{pmatrix} 1&1&1\\-1&1&-1\\1&1&-1\end{pmatrix}$ and $B = \begin{pmatrix} 1&-1&1\\1&1&1\\-1&-1&1\end{pmatrix}$ show by direct computation that
 $(AB)^{\prime}=(B^{\prime}A^{\prime})$