Linear Algebra

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

BACHELOR OF SCIENCE (HONS) MATHEMATICS (CS249)

FACULTY OF COMPUTER & MATHEMATICAL SCIENCES


UITM SHAH ALAM

MINI PROJECT ASSIGNMENT MAT523

(CS2493C)

MEMBERS :

NAME MATRIX ID
FAZLIYANA BT GHAZALI 2017792083
NURUL FARHANAH BT MD ISA 2017194783

LECTURER’S NAME :

DR.FATIMAH BT YAHYA

SUBMISSION DATE :

18TH MAY 2018

1
INTODUCTION

As a human’s body grows taller the rest of their body must adjust to this growth. Both the arm span length
and the height grow in relation to one another.Therefore, as humans get taller, their arm span changes and
this means that height is the independent variable and the arm span is the dependent variable. We using
three mathematical models to find the best fit curve for these data which are :-

1. Linear model

2. Quadratic model

3. Cubic model

HEIGHT ARM SPAN


142 138
148 144
152 148
150 145
141 136
142 139
149 144
151 145
147 144
152 148
150 147
152 141
148 144
152 148
144 140
148 143
150 146
138 134
145 142
142 138

2
150
148
146
144

Arm span (cm)


142
140
Arm Span (cm)
138
136
134
132
135 140 145 150 155
Height (cm)

1. LINEAR MODEL

i. MATRIX REPRESENTATION.

Mv = y

1 142 138
1 148 144
1 152 148
1 150 145
1 141 136
1 142 139
1 149 144
1 151 145
1 147 144
1 152 𝑎 148
[ ]=
1 150 𝑏 147
1 152 141
1 148 144
1 152 148
1 144 140
1 148 143
1 150 146
1 138 134
1 145 142
[1 142] [138]

3
ii. NORMAL EQUATION.

138 = a + 142b 147 = a + 150b

144 = a + 148b 141 = a + 152b

148 = a + 152b 144 = a + 148b

145 = a + 150b 148 = a + 152b

136 = a + 141b 140 = a + 144b

139 = a + 142b 143 = a + 148b

144 = a + 149b 146 = a + 150b

145 = a + 151b 134 = a + 138b

144 = a + 147b 142 = a + 145b

148 = a + 152b 138 = a + 142b

iii. LEAST SQUARE SOLUTION.

14.496
Least square error vector, y-Mv = [ ]
0.8712
Least square error, || y-Mv ||= 14.522

iv. EQUATION OF THE BEST FIT CURVE.

y = 0.8712x + 14.496

4
v. GRAPH.

This is a linear graph, y = 0.8712x + 14.496 which have slope of 0.8712. This data have a linear
component that can be described by a best fit line having a non-zero slope. They also have a random
component that causes them to be scattered somewhat around that best fit line.

5
2. QUADRATIC MODEL

i. MATRIX REPRESENTATION.

Mv = y

1 142 20164 138


1 148 21904 144
1 152 23104 148
1 150 22500 145
1 141 19881 136
1 142 20164 139
1 149 22201 144
1 151 22801 145
1 147 21609 144
𝑎
1 152 23104 𝑏 148
[ ]=
1 150 22500 𝑐 147
1 152 23104 141
1 148 21904 144
1 152 23104 148
1 144 20736 140
1 148 21904 143
1 150 22500 146
1 138 19044 134
1 145 21025 142
[1 142 20164] [138]

ii. NORMAL EQUATION.

138 = a + 142b + (142)2c 147 = a + 150b + (150)2c

144 = a + 148b + (148)2c 141 = a + 152b + (152)2c

148 = a + 152b + (152)2c 144 = a + 148b + (148)2c

145 = a + 150b + (150)2c 148 = a + 152b + (152)2c

136 = a + 141b + (141)2c 140 = a + 144b + (144)2c

139 = a + 142b + (142)2c 143 = a + 148b + (148)2c

144 = a + 149b + (149)2c 146 = a + 150b + (150)2c

145 = a + 151b + (151)2c 134 = a + 138b + (138)2c

144 = a + 147b + (147)2c 142 = a + 145b + (145)2c

148 = a + 152b + (152)2c 138 = a + 142b + (142)2

6
iii. LEAST SQUARE SOLUTION.

−656.61
Least square error vector, y-Mv = [ 10.077 ]
−0.0315
Least square error, || y-Mv ||= 656.69

iv. EQUATION OF THE BEST FIT CURVE.

y = -0.0315x2 + 10.077x - 656.61

v. GRAPH.

This is a quadratic graph, y = -0.0315x2 + 10.077x - 656.61.This is a polynomial of degree two. From the
graph, we can conclude that the higher the height of an individual, the longer the arm span of that
individual

7
3. CUBIC MODEL

i. MATRIX REPRESENTATION.

Mv = y

1 142 20164 2863288 138


1 148 21904 3241792 144
1 152 23104 3511808 148
1 150 22500 3375000 145
1 141 19881 2803221 136
1 142 20164 2863288 139
1 149 22201 3307949 144
1 151 22801 3442951 145
1 147 21609 3176523 𝑎 144
1 152 23104 3511808 𝑏 148
[ ]=
1 150 22500 3375000 𝑐 147
1 152 23104 3511808 𝑑 141
1 148 21904 3241792 144
1 152 23104 3511808 148
1 144 20736 2985984 140
1 148 21904 3241792 143
1 150 22500 3375000 146
1 138 19044 2628072 134
1 145 21025 3048625 142
[1 142 20164 2863288] [138]

ii. NORMAL EQUATION.

138 = a + 142b + (142)2c + (142)3d 147 = a + 150b + (150)2c + (150)3d

144 = a + 148b + (148)2c + (148)3d 141 = a + 152b + (152)2c + (152)3d

148 = a + 152b + (152)2c + (152)3d 144 = a + 148b + (148)2c + (148)3d

145 = a + 150b + (150)2c + (150)3d 148 = a + 152b + (152)2c + (152)3d

136 = a + 141b + (141)2c+ (141)3d 140 = a + 144b + (144)2c + (144)3d

139 = a + 142b + (142)2c + (142)3d 143 = a + 148b + (148)2c + (148)3d

144 = a + 149b + (149)2c + (149)3d 146 = a + 150b + (150)2c + (150)3d

145 = a + 151b + (151)2c + (151)3d 134 = a + 138b + (138)2c + (138)3d

144 = a + 147b + (147)2c + (147)3d 142 = a + 145b + (145)2c + (145)3d

148 = a + 152b + (152)2c + (152)3d 138 = a + 142b + (142)2c + (142)d

8
iii. LEAST SQUARE SOLUTION.

−0.0029
1.2305
Least square error vector, y-Mv =[ ]
− 173.44
8234.5
Least square error, || y-Mv ||= 8236.33

iv. EQUATION OF THE BEST FIT CURVE.

y = -0.0029x3 + 1.2305x2 - 173.44x + 8234.5

v. GRAPH.

This is a quadratic graph, y = -0.0029x3 + 1.2305x2 - 173.44x + 8234.5. This is a polynomial of degree
three. This graph does not have the best fit curve for the data.

9
CONCLUSION

The best fit curve for this case which will give the best approximation is the linear best fit curve.
This is because it has the minimum error among three models in terms of its magnitude/norm
obtained from calculation above.

APPENDIX

10

You might also like