Sunteți pe pagina 1din 17

Scalars, Vectors & Matrices 1

MaLrlces
MaLrlx Crdered seL of scalars arranged ln a recLangular paLLern

=
3 3 0
2 5 12
6 8 3

=
5 0
1 8
2 3

W aLrlx wlLh 3 rows and 3 coluns


W aLrlx ls of order 3x3
W aLrlx ls a square aLrlx of order 3
W aLrlx wlLh 3 rows and 2 coluns
W aLrlx ls of order 3x2
Scalars, Vectors & Matrices 2
W reaLe an flle wlLh Lhe code shown
W LleenLs of a aLrlx are enLered rowby
row wlLh a selcolon separaLlng Lhe
rows
W lncluslon of a carrlage reLurn beLween
rows ls opLlonal
W Save Lhe flle ln your workspace as
aLrlx_1#
W LxecuLe Lhe progra fro Lhe oand
Wlndow and verlfy Lhe resulLs shown
Scalars, Vectors & Matrices 3
) 6 8 3 =

=
0
8
3

W aLrlx wlLh a slngle row ls


referred Lo as a row vecLor#
W aLrlx wlLh a slngle colun ls
referred Lo as a colun vecLor#
W aLrlx wlLh a slngle nuber can
sLlll be LreaLed as a aLrlx lL ls
referred Lo as a scalar#
W n lndlvldual eleenL ln a aLrlx ls
ldenLlfled by lLs row and colun
nuber
) 3 3 = =
3
number column
number row
3 3 0
2 5 12
6 8 3
2 , 3
,
=
=
=


Scalars, Vectors & Matrices 4
W dd Lhe code shown Lo Lhe end of your
aLrlx_1 flle
W Save Lhe changes execuLe Lhe flle fro
Lhe oand Wlndow and verlfy Lhe
addlLlonal ouLpuL shown
W lndlvldual eleenLs of a aLrlx are
ldenLlfled by row and colun nubers
ln parenLhesls by Lhe aLrlx nae
W LleenLs of a aLrlx can be changed
lndlvldually
W Lxaple of a row vecLor
W Lxaple of a colun vecLor
Scalars, Vectors & Matrices 5
Scalar MulLlpllcaLlon

=
5 0
1 8
2 3

- -
- -
- -
= =
15 0
3 24
6 9
5 3 0 3
1 3 8 3
2 3 3 3
3
W ln Lhe scalar ulLlpllcaLlon of a
aLrlx each eleenL of Lhe aLrlx
ls ulLlplled by Lhe sae scalar
value
Scalars, Vectors & Matrices 6
MaLrlx ddlLlon or SubLracLlon

=
5 0
1 8
2 3

=
4 2
2 3
1 5

+
+ +
+ +
= + =
9 2
1 11
3 8
4 5 2 0
2 1 3 8
1 2 5 3

W or aLrlx addlLlon (or subLracLlon) Lhe
eleenLs of Lwo aLrlces are added (or
subLracLed) on eleenL by eleenL
basls
W 1he Lwo aLrlces usL be of equal order
le Lhey usL have Lhe sae nuber of
rows and coluns
W 1he resulL wlll be of Lhe sae order
Scalars, Vectors & Matrices 7
W Modlfy aLrlx_1 by addlng Lhe llnes
shown
W Save Lhe changes execuLe Lhe progra and
verlfy Lhe addlLlonal ouLpuL shown
W Scalar ulLlpllcaLlon of a aLrlx
W MaLrlx addlLlon
Scalars, Vectors & Matrices 8
MaLrlx MulLlpllcaLlon

=
5 0
1 8
2 3


=
4 2 1
2 3 5

- + - + - - + - + -
- + - + - - + - + -
= - =
4 5 2 ) 1 ( 1 2 4 0 2 8 1 3
) 2 ( 5 3 ) 1 ( 5 2 ) 2 ( 0 3 8 5 3


= - =
20 19
3 39

W or aLrlx ulLlpllcaLlon Lhe eleenLs ln Lhe
rows of Lhe flrsL aLrlx are ulLlplled by
eleenLs of Lhe coluns of Lhe second aLrlx
and Lhe producLs are added
W 1he aLrlces usL have opposlng order le
Lhe nuber of coluns of Lhe flrsL aLrlx
usL equal Lhe nuber of rows of Lhe second
aLrlx
W 8esulL ls a square aLrlx
Scalars, Vectors & Matrices 9
W Modlfy aLrlx_1 by addlng Lhe llnes
shown
W Save Lhe changes execuLe Lhe progra
and verlfy Lhe addlLlonal ouLpuL shown
W MaLrlx ulLlpllcaLlon of a 2x3 by a 3x3
resulLs ln a 2x3 aLrlx
W MaLrlx ulLlpllcaLlon of a 3x3 by a 2x3
ls lnvalld and resulLs ln an error essage
W MaLrlx ulLlpllcaLlon requlres aLrlces of
opposlng order
p x * x q p x q
Scalars, Vectors & Matrices 10
Speclal MaLrlces

=
1 4 5
1 6 3
4 8 2
1 1 4
4 6 8
5 3 2
%

=
1 1 4
4 6 8
5 3 2
1 0 0
0 1 0
0 0 1

W or Lhe Lranspose# of a aLrlx Lhe


rows and coluns are exchanged
W 1he ldenLlLy aLrlx# has 1's on Lhe
dlagonal and 0's for all of Lhe off
dlagonal eleenLs
W MulLlplylng a aLrlx by Lhe ldenLlLy
aLrlx ylelds Lhe sae orlglnal
aLrlx
W MulLlplylng by Lhe ldenLlLy aLrlx ls
analogous Lo ulLlplylng a scalar by
one
Scalars, Vectors & Matrices 11
Speclal MaLrlces

+
+
=

1 0
0 1
9 / 1 3 9 / 2 3 9 / 1 4 9 / 2 2
6 / 1 3 6 / 1 3 6 / 1 4 6 / 1 2
1

=
1 4
6 8
3 2

9 / 1 9 / 2
6 / 1 6 / 1
1

W MulLlplylng a aLrlx by lLs lnverse#


resulLs ln Lhe ldenLlLy aLrlx
W MulLlplylng a aLrlx by lLs lnverse ls
analogous Lo dlvldlng a scalar by lLself
Lhe resulL ls one
W 1he process for Lhe deLerlnaLlon of Lhe
lnverse of a aLrlx ls well deflned buL
Ledlous 1ools are avallable Lo do Lhls ln
Lxcel MaLlab and MaLhcad
Scalars, Vectors & Matrices 12
W Modlfy aLrlx1 by addlng Lhe llnes
shown
W noLe LhaL Lo avold generaLlng Lhe aLrlx
ulLlply error Lhe lncorrecL llne has been
Lurned lnLo an nonexecuLable coenL
by beglnnlng Lhe llne wlLh a characLer
W Save Lhe changes execuLe Lhe progra
and verlfy Lhe addlLlonal ouLpuL shown
W ln MaLlab Lhe Lranspose of a aLrlx ls
lndlcaLed by addlng an aposLrophe afLer
Lhe aLrlx nae
Scalars, Vectors & Matrices 13
W Modlfy aLrlx1 by addlng Lhe llnes
shown
W Save Lhe changes execuLe Lhe progra
and verlfy Lhe addlLlonal ouLpuL shown
W 1he ldenLlLy aLrlx has 1's on Lhe dlagonal
and 0's for all oLher eleenLs
W MulLlplylng a aLrlx by Lhe ldenLlLy aLrlx
ylelds Lhe orlglnal aLrlx
Scalars, Vectors & Matrices 14
SoluLlon of Llnear LquaLlon SeLs
2 3 4
8 3 2
=
= +

W Llnearly lndependenL equaLlon seL
vector side hand - right
unknowns oI vector
matrix t coeIIicien
2
8
3 4
3 2
=
=
=
=
)
`

|
,
|

=
)
`

|
,
|

W rrange equaLlons ln aLrlx foraL


Scalars, Vectors & Matrices 15
SoluLlon of Llnear LquaLlon SeLs



1
1
1 1


=
=
=


)
`

|
,
|
=

=
)
`

|
,
|

=
2
1
9 / 1 2 9 / 2 8
6 / 1 2 6 / 1 8
2
8
9 / 1 9 / 2
6 / 1 6 / 1

W MulLlply Lhrough by Lhe lnverse of


Lhe coefflclenL aLrlx
W 1he lefLhand slde ls [usL Lhe vecLor
of unknowns
W LvaluaLlng Lhe rlghLhand slde
produces Lhe soluLlon
Scalars, Vectors & Matrices 16
SoluLlon of Llnear LquaLlon SeLs

=
)
`

|
,
|

+
+
=
)
`

|
,
|

=
)
`

|
,
|
=
2
8
3 2 4 1
3 2 2 1
2
1
3 4
3 2
2
1
W 9erfor a check by ulLlplylng Lhe
orlglnal coefflclenL aLrlx by Lhe soluLlon
vecLor
W 1he resulL should be equal Lo Lhe rlghL
hand slde vecLor fro Lhe equaLlon seL
Scalars, Vectors & Matrices 17
W Modlfy aLrlx_1 by addlng Lhe llnes
shown
W Save Lhe changes execuLe Lhe progra and
verlfy Lhe addlLlonal ouLpuL shown
W MaLlab lncludes a bullLln# funcLlon for
evaluaLlng Lhe lnverse of a aLrlx lnv()
W noLe LhaL ulLlplylng a aLrlx by lLs lnverse
resulLs ln Lhe ldenLlLy aLrlx
W alculaLe Lhe soluLlon for Lhe llnear equaLlon
seL by ulLlplylng Lhe rlghLhandslde vecLor
by Lhe lnverse of Lhe coefflclenL aLrlx

S-ar putea să vă placă și