<jupyter_start><jupyter_text>**Download** (right-click, save target as ...) this page as a jupyterlab notebook from: [Lab8-TH](http://54.243.252.9/engr-1330-webroot/8-Labs/Lab08/Lab08-TH.ipynb)___  Laboratory 8: Matrices a Red Pill Approach **LAST NAME, FIRST NAME****R00000000**ENGR 1330 Laboratory 8 - Homework<jupyter_code># Preamble script block to identify host, user, and kernel
import sys
! hostname
! whoami
print(sys.executable)
print(sys.version)
print(sys.version_info)<jupyter_output>atomickitty
sensei
/opt/jupyterhub/bin/python3
3.8.10 (default, Jun  2 2021, 10:49:15) 
[GCC 9.4.0]
sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)<jupyter_text>___ Reading Files  Exercise 0 Define the matrix A and the vector u in Python. Then perform all of the tasks below. \begin{gather}\mathbf{A} =\begin{pmatrix}1 & 3 & 5 & 7 \\2 & 4 & 6 & 8 \\-3 & -2 & -1 & 0 \\\end{pmatrix}~ \mathbf{u} = \begin{pmatrix}10 \\20 \\30 \\\end{pmatrix}\end{gather}1. Print the matrix A2. Print the vector u3. Print the shape of A 4. Print the shape of u5. Print the first column of A6. Print the first two rows of A7. Print the first two entries of u8. Print the last two entries of u9. Print the bottom left 2×2 partition (submatrix) of A10. Print the middle two elements of the middle row of A---Use the code blocks below to craft your answer.<jupyter_code>#%reset -f # only if necessary
# read/create matrix A
# read/create vector u
# print A
# print u
# determine and Print the shape of A 
# determine andPrint the shape of u
# Print the first column of A
# Print the first two rows of A
# Print the first two entries of u
# Print the last two entries of u
# Print the bottom left 2×2 partition (submatrix) of A
# Print the middle two elements of the middle row of A<jupyter_output><empty_output><jupyter_text>Exercise 1Use your script to multiply two matrices, just like in the Lab (in-Lab portion).Apply the script to find $\mathbf{A}\mathbf{B}$ where.\begin{gather}\mathbf{A} =\begin{pmatrix}1 & 2 \\3 & 4 \\5 & 6  \\\end{pmatrix}~~~~ \mathbf{B} = \begin{pmatrix}7 & 8 & 9 \\10 & 11 & 12 \\\end{pmatrix}\end{gather} The two matrices are located in files:[http://54.243.252.9/engr-1330-webroot/8-Labs/Lab08/Amat.txt](http://54.243.252.9/engr-1330-webroot/8-Labs/Lab08/Amat.txt)and:[http://54.243.252.9/engr-1330-webroot/8-Labs/Lab08/Bmat.txt](http://54.243.252.9/engr-1330-webroot/8-Labs/Lab08/Bmat.txt)You should download these files before proceeding<jupyter_code># read file Amat.txt
# read file Bmat.txt
# create a destination matrix ABmatrix
# print Amat
# print Bmat
# perform the multiplication put the result into ABmatrix 
# print ABmatrix<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12537091988130564, 'fraction_numerical': 0.06342729970326409, 'mean_word_length': 4.196531791907514, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '132966', 'license': 'CC0-1.0', 'n_tokens_mistral': 1034, 'n_tokens_neox': 920, 'n_words': 320, 'path': '8-Labs/Lab08/Lab08-TH.ipynb', 'repo_name': 'dustykat/engr-1330-webroo', 'size': '2696'}