0% found this document useful (0 votes)
10 views

Question 04

Political science honours

Uploaded by

Life Hack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Question 04

Political science honours

Uploaded by

Life Hack
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

In[10]:= A = {{2, 1, - 3}, {5, 8, 1}, {4, 13, 11}};

A // MatrixForm
Out[11]//MatrixForm=
2 1 -3
5 8 1
4 13 11
Out[9]//MatrixForm=
2 1 -3
5 8 1
4 13 11
Out[7]//MatrixForm=
2 1 -3
5 8 1
4 13 11

In[12]:= x = {x1, x2, x3};


x // MatrixForm
Out[13]//MatrixForm=
x1
x2
x3

In[14]:= b = {{0}, {14}, {25}};


b // MatrixForm
Out[15]//MatrixForm=
0
14
25

In[16]:= aug = ArrayFlatten[{{A, b}}];


aug // MatrixForm
Out[17]//MatrixForm=
2 1 -3 0
5 8 1 14
4 13 11 25

In[18]:= aug〚2〛 = aug〚2〛 - (5 / 2) * aug〚1〛;


aug〚3〛 = aug〚3〛 - 2 * aug〚1〛;
aug // MatrixForm
Out[20]//MatrixForm=
2 1 -3 0
11 17
0 2 2
14
0 11 17 25
2

In[21]:= aug〚2〛 = 2 * aug〚2〛;


aug // MatrixForm
Out[22]//MatrixForm=
2 1 -3 0
0 11 17 28
0 11 17 25

In[23]:= aug〚3〛 = aug〚3〛 - aug〚2〛;


aug // MatrixForm
Out[24]//MatrixForm=
2 1 -3 0
0 11 17 28
0 0 0 -3

In[25]:= upper = Take[aug, 3, 3];


upper // MatrixForm
Out[26]//MatrixForm=
2 1 -3
0 11 17
0 0 0

In[27]:= c = Take[aug, 3, {4, 4}];


c // MatrixForm
Out[28]//MatrixForm=
0
28
-3

In[29]:= upper.x ⩵ c
Out[29]= {2 x1 + x2 - 3 x3, 11 x2 + 17 x3, 0} ⩵ {{0}, {28}, {- 3}}

In[1]:= Solve [upper.x ⩵ c]


Out[1]= {{upper.x → c}}

Set: Tag Dot in upper.x is Protected.

Out[3]= c

Out[32]= {}

Out[1]= {{upper.x → c}}

You might also like