SlideShare a Scribd company logo
1 of 7
Download to read offline
Lower triangular sums
Objectives. Learn to write lower triangular sums (starting with the index 1) in various
manners: by rows, by columns and by diagonals.
Requirements. MATLAB, GNU Octave, Wolfram Mathematica or another program-
ming language working with matrices and starting indices by 1.
Lower triangular summing by rows
1. Consider the sum corresponding to the picture. We are going to write in a short form
the sum of all nodes in the order indicated by arrows.
k
j
j=1
j=2
j=3
j=4
k=1 k=2 k=3 k=4
a1,1
a2,1 a2,2
a3,1 a3,2 a3,3
a4,1 a4,2 a4,3 a4,4
First write all summands in the explicit form (joining summands by rows):
S = a1,1 + a2,1 + a2,2 + + .
Rewrite each one of the little sums using the symbol :
S =
1
k=1
a1,k +
2
k=1
a2,k + + .
Note that all summands have the same form. Pass to a double sum:
S =
j= k=
aj,k.
Lower triangular sums, page 1 of 7
2. Program (summing by rows the entries of a lower triangular matrix). Write
a simple program that creates a random matrix and sums all its entries row by row. Here
is an example of such a program in GNU Octave (substitute ??? by apropiate expressions):
A = tril(1 + round(8 * rand(4, 4)));
disp(A);
s = 0;
for j = 1 : 4
for k = ??? : ???
s = s + A(j, k);
endfor
endfor
disp("My answer:"); disp(s);
disp("Correct answer:"); disp(sum(sum(A)));
3. Lower triangular summing by rows. Generalize the formula to the case of a n×n
matrix:
S =
j= k=
.
Lower triangular sums, page 2 of 7
Lower triangular summing by columns
4. Write the sum corresponding to the picture. Now we are summing by columns.
k
j
j=1
j=2
j=3
j=4
k=1 k=2 k=3 k=4
a1,1
a2,1 a2,2
a3,1 a3,2 a3,3
a4,1 a4,2 a4,3 a4,4
First write all summands in the explicit form (joining them by columns):
S = a1,1 + a2,1 + a3,1 + a4,1 + + + .
Rewrite each one of the little sums using the symbol :
S =
4
j=1
aj,1 + + + .
Note that all summands have the same form. Pass to a double sum:
S =
k= j=
aj,k.
5. Write a program that creates a random lower triangular matrix and sums its entries
by columns.
Lower triangular sums, page 3 of 7
Diagonals of a lower triangular matrix
6. Calculate the difference d := j − k for each entry aj,k of the following lower triangular
matrix:
k
j
j=1
j=2
j=3
j=4
k=1 k=2 k=3 k=4
a1,1
d =
a2,1
d =
a2,2
d =
a3,1
d =
a3,2
d =
a3,3
d =
a4,1
d =
a4,2
d =
a4,3
d =
a4,4
d =
The entries satisfying j = k form the main diagonal (or the zeroth diagonal) of the matrix;
the entries satisfying j − k = 1 are on the first diagonal, and so on.
7. If aj,k belongs to the second diagonal, then j can be expressed through k in the
following manner:
j =
?
.
8. Fix some d ∈ {0, 1, 2, 3}. If aj,k is on the diagonal with index d, then j can be expressed
through k and d in the following manner:
j =
?
.
Lower triangular sums, page 4 of 7
Lower triangular summing by diagonals
9. Write the sum corresponding to the picture. Now we are summing by diagonals.
k
j
j=1
j=2
j=3
j=4
k=1 k=2 k=3 k=4
a1,1
a2,1 a2,2
a3,1 a3,2 a3,3
a4,1 a4,2 a4,3 a4,4
First write all summands in the explicit form (joining them by diagonals):
S = a1,1 + a2,2 + a3,3 + a4,4 + + + .
In each group the first index (“j”) can be expressed through the second (“k”) by a simple
rule, so we can avoid j:
S =
4
k=1
ak,k +
k= a?,k
+
k=
+
k=
.
The first sum corresponds to d = 0, the second to d = 1, and so on:
S =
d= k=
.
Lower triangular sums, page 5 of 7
Double lower triangular sum and formal changes of variables
10. Lower triangular summing by rows (recall). Recall the general formula for the
lower triangular sum (n × n case) in which the terms are collected by rows:
S =
j= k=
aj,k. (1)
11. Summing by columns via an interchange of variables. Write two double
inequalities that must satisfy j and k:
?
≤ j ≤
?
,
?
≤ k ≤
?
.
Separate these two double inequalities in four simple inequalities:
j ≥
?
, j ≤
?
, k ≥
?
, k ≤
?
.
What is the maximum value (independent on j) that can take k?
What is the minimum value (independent on j) that can take k?
In other words, what are global limits of k?
Find the minimum and maximum values of k (independent on j):
?
≤ k ≤
?
.
For each k fixed, find restrictions on j:
?
≤ j ≤
?
.
Rewrite the sum S:
S =
k= j=
aj,k.
Lower triangular sums, page 6 of 7
12. Summing by diagonals via a formal change of variables. Write 4 inequalities
that satisfy j and k in the sum (1):
j ≥
?
, j ≤
?
, k ≥
?
, k ≤
?
.
Find restrictions that satisfy the difference d:
?
≤ d ≤
?
Express j through d and k:
j =
?
.
Substitute this expression into the equalities with j, then solve them for k (treat d as a
parameter):
Rewrite the sum S as a double sum over d and k:
S =
d= k=
a?,k
.
Lower triangular sums, page 7 of 7

More Related Content

What's hot (18)

Paper no. 4
Paper no. 4Paper no. 4
Paper no. 4
 
Catalan number presentation2
Catalan number presentation2Catalan number presentation2
Catalan number presentation2
 
PMR Form 3 Mathematics Algebraic Fractions
PMR Form 3 Mathematics Algebraic FractionsPMR Form 3 Mathematics Algebraic Fractions
PMR Form 3 Mathematics Algebraic Fractions
 
02 linear algebra
02 linear algebra02 linear algebra
02 linear algebra
 
IIT JEE Maths 2000
IIT JEE Maths   2000IIT JEE Maths   2000
IIT JEE Maths 2000
 
Hprec2 4
Hprec2 4Hprec2 4
Hprec2 4
 
Applications of Linear Algebra
Applications of Linear AlgebraApplications of Linear Algebra
Applications of Linear Algebra
 
4
44
4
 
Lesson 1 imaginary and complex numbers p1 8
Lesson 1 imaginary and complex numbers p1 8Lesson 1 imaginary and complex numbers p1 8
Lesson 1 imaginary and complex numbers p1 8
 
complex numbers 1
complex numbers 1complex numbers 1
complex numbers 1
 
IIT JEE Maths 1999
IIT JEE Maths   1999IIT JEE Maths   1999
IIT JEE Maths 1999
 
Complex numbers And Quadratic Equations
Complex numbers And Quadratic EquationsComplex numbers And Quadratic Equations
Complex numbers And Quadratic Equations
 
Expresiones algebraicas
Expresiones algebraicasExpresiones algebraicas
Expresiones algebraicas
 
1.2 Systems of Linear Equations
1.2 Systems of Linear Equations1.2 Systems of Linear Equations
1.2 Systems of Linear Equations
 
Class 11 maths support material
Class 11 maths support materialClass 11 maths support material
Class 11 maths support material
 
1631 the binomial theorem
1631 the binomial theorem1631 the binomial theorem
1631 the binomial theorem
 
Day 03
Day 03Day 03
Day 03
 
Takue
TakueTakue
Takue
 

Viewers also liked

Installing license server
Installing license serverInstalling license server
Installing license serverKang YAyan
 
Mobile Applications for Business
Mobile Applications for BusinessMobile Applications for Business
Mobile Applications for BusinesseMobiApp
 
The ilex
The ilexThe ilex
The ilexhor265
 
Presentación informe de gestion l2013
Presentación informe de gestion l2013Presentación informe de gestion l2013
Presentación informe de gestion l2013sarebravo
 
Sap gui scripting api with guixt
Sap gui scripting api with guixtSap gui scripting api with guixt
Sap gui scripting api with guixtKang YAyan
 
Modern UX, UI, and front-end tools
Modern UX, UI, and front-end toolsModern UX, UI, and front-end tools
Modern UX, UI, and front-end toolsAlan Roy
 
Developing Listening and Speaking Skills with Technology
Developing Listening and Speaking Skills with TechnologyDeveloping Listening and Speaking Skills with Technology
Developing Listening and Speaking Skills with TechnologyFer De Vega
 
Monitor-Driven Development Using Ansible
Monitor-Driven Development Using AnsibleMonitor-Driven Development Using Ansible
Monitor-Driven Development Using AnsibleItamar Hassin
 
Embedded software development using BDD
Embedded software development using BDDEmbedded software development using BDD
Embedded software development using BDDItamar Hassin
 
Mobile Applications for Restaurants
Mobile Applications for RestaurantsMobile Applications for Restaurants
Mobile Applications for RestaurantseMobiApp
 
Let start with GUIXT
Let start with GUIXTLet start with GUIXT
Let start with GUIXTKang YAyan
 

Viewers also liked (15)

my trip to ecudador
my trip to ecudadormy trip to ecudador
my trip to ecudador
 
Digital Footprint
Digital FootprintDigital Footprint
Digital Footprint
 
Installing license server
Installing license serverInstalling license server
Installing license server
 
Mobile Applications for Business
Mobile Applications for BusinessMobile Applications for Business
Mobile Applications for Business
 
The ilex
The ilexThe ilex
The ilex
 
Cmac final report
Cmac final reportCmac final report
Cmac final report
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Presentación informe de gestion l2013
Presentación informe de gestion l2013Presentación informe de gestion l2013
Presentación informe de gestion l2013
 
Sap gui scripting api with guixt
Sap gui scripting api with guixtSap gui scripting api with guixt
Sap gui scripting api with guixt
 
Modern UX, UI, and front-end tools
Modern UX, UI, and front-end toolsModern UX, UI, and front-end tools
Modern UX, UI, and front-end tools
 
Developing Listening and Speaking Skills with Technology
Developing Listening and Speaking Skills with TechnologyDeveloping Listening and Speaking Skills with Technology
Developing Listening and Speaking Skills with Technology
 
Monitor-Driven Development Using Ansible
Monitor-Driven Development Using AnsibleMonitor-Driven Development Using Ansible
Monitor-Driven Development Using Ansible
 
Embedded software development using BDD
Embedded software development using BDDEmbedded software development using BDD
Embedded software development using BDD
 
Mobile Applications for Restaurants
Mobile Applications for RestaurantsMobile Applications for Restaurants
Mobile Applications for Restaurants
 
Let start with GUIXT
Let start with GUIXTLet start with GUIXT
Let start with GUIXT
 

Similar to Lower triangular sums_1

Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative methodLuckshay Batra
 
Precalculus 1 chapter 1
Precalculus 1 chapter 1Precalculus 1 chapter 1
Precalculus 1 chapter 1oreves
 
Basic%20Cal%20Final.docx.docx
Basic%20Cal%20Final.docx.docxBasic%20Cal%20Final.docx.docx
Basic%20Cal%20Final.docx.docxSalwaAbdulkarim1
 
2021 noveno guia en casa matematicas periodo 3
2021 noveno guia en casa matematicas periodo 32021 noveno guia en casa matematicas periodo 3
2021 noveno guia en casa matematicas periodo 3Ximena Zuluaga
 
Ib math slsummerassignment2014
Ib math slsummerassignment2014Ib math slsummerassignment2014
Ib math slsummerassignment2014Michelle Eff
 
Applied Algorithms and Structures week999
Applied Algorithms and Structures week999Applied Algorithms and Structures week999
Applied Algorithms and Structures week999fashiontrendzz20
 
Dynamic1
Dynamic1Dynamic1
Dynamic1MyAlome
 
Index notation
Index notationIndex notation
Index notationMERTEKMEN
 
Stochastic Processes Homework Help
Stochastic Processes Homework HelpStochastic Processes Homework Help
Stochastic Processes Homework HelpExcel Homework Help
 
1.  Write an equation in standard form of the parabola that has th.docx
1.  Write an equation in standard form of the parabola that has th.docx1.  Write an equation in standard form of the parabola that has th.docx
1.  Write an equation in standard form of the parabola that has th.docxKiyokoSlagleis
 
Nbhm m. a. and m.sc. scholarship test 2007
Nbhm m. a. and m.sc. scholarship test 2007 Nbhm m. a. and m.sc. scholarship test 2007
Nbhm m. a. and m.sc. scholarship test 2007 MD Kutubuddin Sardar
 
Proof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungProof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungVu Hung Nguyen
 
1. Graph the exponential function by hand. Identify any asymptotes.docx
1. Graph the exponential function by hand. Identify any asymptotes.docx1. Graph the exponential function by hand. Identify any asymptotes.docx
1. Graph the exponential function by hand. Identify any asymptotes.docxjackiewalcutt
 
Dynamic Programming.pptx
Dynamic Programming.pptxDynamic Programming.pptx
Dynamic Programming.pptxThanga Ramya S
 

Similar to Lower triangular sums_1 (20)

Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative method
 
Precalculus 1 chapter 1
Precalculus 1 chapter 1Precalculus 1 chapter 1
Precalculus 1 chapter 1
 
Linear Equations in Two Variables.pptx
Linear Equations in Two Variables.pptxLinear Equations in Two Variables.pptx
Linear Equations in Two Variables.pptx
 
Basic%20Cal%20Final.docx.docx
Basic%20Cal%20Final.docx.docxBasic%20Cal%20Final.docx.docx
Basic%20Cal%20Final.docx.docx
 
2021 noveno guia en casa matematicas periodo 3
2021 noveno guia en casa matematicas periodo 32021 noveno guia en casa matematicas periodo 3
2021 noveno guia en casa matematicas periodo 3
 
Quadratic equations
Quadratic equationsQuadratic equations
Quadratic equations
 
Ib math slsummerassignment2014
Ib math slsummerassignment2014Ib math slsummerassignment2014
Ib math slsummerassignment2014
 
Applied Algorithms and Structures week999
Applied Algorithms and Structures week999Applied Algorithms and Structures week999
Applied Algorithms and Structures week999
 
Dynamic1
Dynamic1Dynamic1
Dynamic1
 
Index notation
Index notationIndex notation
Index notation
 
Stochastic Processes Homework Help
Stochastic Processes Homework HelpStochastic Processes Homework Help
Stochastic Processes Homework Help
 
1.  Write an equation in standard form of the parabola that has th.docx
1.  Write an equation in standard form of the parabola that has th.docx1.  Write an equation in standard form of the parabola that has th.docx
1.  Write an equation in standard form of the parabola that has th.docx
 
Nbhm m. a. and m.sc. scholarship test 2007
Nbhm m. a. and m.sc. scholarship test 2007 Nbhm m. a. and m.sc. scholarship test 2007
Nbhm m. a. and m.sc. scholarship test 2007
 
Proof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungProof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hung
 
Cse41
Cse41Cse41
Cse41
 
1. Graph the exponential function by hand. Identify any asymptotes.docx
1. Graph the exponential function by hand. Identify any asymptotes.docx1. Graph the exponential function by hand. Identify any asymptotes.docx
1. Graph the exponential function by hand. Identify any asymptotes.docx
 
Algebra
AlgebraAlgebra
Algebra
 
Algebra part 2
Algebra part 2Algebra part 2
Algebra part 2
 
Dynamic Programming.pptx
Dynamic Programming.pptxDynamic Programming.pptx
Dynamic Programming.pptx
 
Statistical Method In Economics
Statistical Method In EconomicsStatistical Method In Economics
Statistical Method In Economics
 

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

Lower triangular sums_1

  • 1. Lower triangular sums Objectives. Learn to write lower triangular sums (starting with the index 1) in various manners: by rows, by columns and by diagonals. Requirements. MATLAB, GNU Octave, Wolfram Mathematica or another program- ming language working with matrices and starting indices by 1. Lower triangular summing by rows 1. Consider the sum corresponding to the picture. We are going to write in a short form the sum of all nodes in the order indicated by arrows. k j j=1 j=2 j=3 j=4 k=1 k=2 k=3 k=4 a1,1 a2,1 a2,2 a3,1 a3,2 a3,3 a4,1 a4,2 a4,3 a4,4 First write all summands in the explicit form (joining summands by rows): S = a1,1 + a2,1 + a2,2 + + . Rewrite each one of the little sums using the symbol : S = 1 k=1 a1,k + 2 k=1 a2,k + + . Note that all summands have the same form. Pass to a double sum: S = j= k= aj,k. Lower triangular sums, page 1 of 7
  • 2. 2. Program (summing by rows the entries of a lower triangular matrix). Write a simple program that creates a random matrix and sums all its entries row by row. Here is an example of such a program in GNU Octave (substitute ??? by apropiate expressions): A = tril(1 + round(8 * rand(4, 4))); disp(A); s = 0; for j = 1 : 4 for k = ??? : ??? s = s + A(j, k); endfor endfor disp("My answer:"); disp(s); disp("Correct answer:"); disp(sum(sum(A))); 3. Lower triangular summing by rows. Generalize the formula to the case of a n×n matrix: S = j= k= . Lower triangular sums, page 2 of 7
  • 3. Lower triangular summing by columns 4. Write the sum corresponding to the picture. Now we are summing by columns. k j j=1 j=2 j=3 j=4 k=1 k=2 k=3 k=4 a1,1 a2,1 a2,2 a3,1 a3,2 a3,3 a4,1 a4,2 a4,3 a4,4 First write all summands in the explicit form (joining them by columns): S = a1,1 + a2,1 + a3,1 + a4,1 + + + . Rewrite each one of the little sums using the symbol : S = 4 j=1 aj,1 + + + . Note that all summands have the same form. Pass to a double sum: S = k= j= aj,k. 5. Write a program that creates a random lower triangular matrix and sums its entries by columns. Lower triangular sums, page 3 of 7
  • 4. Diagonals of a lower triangular matrix 6. Calculate the difference d := j − k for each entry aj,k of the following lower triangular matrix: k j j=1 j=2 j=3 j=4 k=1 k=2 k=3 k=4 a1,1 d = a2,1 d = a2,2 d = a3,1 d = a3,2 d = a3,3 d = a4,1 d = a4,2 d = a4,3 d = a4,4 d = The entries satisfying j = k form the main diagonal (or the zeroth diagonal) of the matrix; the entries satisfying j − k = 1 are on the first diagonal, and so on. 7. If aj,k belongs to the second diagonal, then j can be expressed through k in the following manner: j = ? . 8. Fix some d ∈ {0, 1, 2, 3}. If aj,k is on the diagonal with index d, then j can be expressed through k and d in the following manner: j = ? . Lower triangular sums, page 4 of 7
  • 5. Lower triangular summing by diagonals 9. Write the sum corresponding to the picture. Now we are summing by diagonals. k j j=1 j=2 j=3 j=4 k=1 k=2 k=3 k=4 a1,1 a2,1 a2,2 a3,1 a3,2 a3,3 a4,1 a4,2 a4,3 a4,4 First write all summands in the explicit form (joining them by diagonals): S = a1,1 + a2,2 + a3,3 + a4,4 + + + . In each group the first index (“j”) can be expressed through the second (“k”) by a simple rule, so we can avoid j: S = 4 k=1 ak,k + k= a?,k + k= + k= . The first sum corresponds to d = 0, the second to d = 1, and so on: S = d= k= . Lower triangular sums, page 5 of 7
  • 6. Double lower triangular sum and formal changes of variables 10. Lower triangular summing by rows (recall). Recall the general formula for the lower triangular sum (n × n case) in which the terms are collected by rows: S = j= k= aj,k. (1) 11. Summing by columns via an interchange of variables. Write two double inequalities that must satisfy j and k: ? ≤ j ≤ ? , ? ≤ k ≤ ? . Separate these two double inequalities in four simple inequalities: j ≥ ? , j ≤ ? , k ≥ ? , k ≤ ? . What is the maximum value (independent on j) that can take k? What is the minimum value (independent on j) that can take k? In other words, what are global limits of k? Find the minimum and maximum values of k (independent on j): ? ≤ k ≤ ? . For each k fixed, find restrictions on j: ? ≤ j ≤ ? . Rewrite the sum S: S = k= j= aj,k. Lower triangular sums, page 6 of 7
  • 7. 12. Summing by diagonals via a formal change of variables. Write 4 inequalities that satisfy j and k in the sum (1): j ≥ ? , j ≤ ? , k ≥ ? , k ≤ ? . Find restrictions that satisfy the difference d: ? ≤ d ≤ ? Express j through d and k: j = ? . Substitute this expression into the equalities with j, then solve them for k (treat d as a parameter): Rewrite the sum S as a double sum over d and k: S = d= k= a?,k . Lower triangular sums, page 7 of 7