In the following exercises, the "examples" are completed for you and the "problems" are for you to try. Each problem can be solved by a method very similar to the associated example.
from numpy import *
Solve the following equations for $x$ and $y$:
$5x+4y=-1$
$-7x-2y=-13$
There are several ways to solve simultaneous equatiions. Here we use the matrix method for solving linear systems of equations. It amounts to writing the two equations as a $2\times 2$ matrix of coefficients times a $2\times1$ vector of variables.
So
$$Ax + By = E\\ Cx + Dy = F $$is written as
$$\begin{bmatrix}A & B \\ C & D \end{bmatrix} \begin{bmatrix} x\\ y\end{bmatrix} = \begin{bmatrix} E\\ F\end{bmatrix} $$To get our problem in this form, write
$$\begin{bmatrix}5 & 4 \\ -7 & -2 \end{bmatrix} \begin{bmatrix} x\\ y\end{bmatrix} = \begin{bmatrix} -1\\ -13\end{bmatrix} $$This is solved this with the linalg (i.e., linear algebra) routines as follows.
CC = array((( 5., 4. ),
( -7., -2. ) ))
SS = array(( -1., -13. ))
solution = linalg.solve(CC,SS)
print(solution)
That is, $x=3$ and $y=-4$ solve our system of equations.
Solve the following equations for $x$, $y$ and $z$:
$2x+-y+3z=37$
$x+y-3z=-16$
$-3x+5z=24$
(solution: $x=7$, $y=4$, $z=9$)
dtr = pi/180. # a factor to convert degrees to radians
# part a
R1 = 183.*array(( cos(55*dtr), sin(55*dtr) )) # mm
R2 = array(( 101., 0. )) # mm
R = R1+R2
print ('a. vector sum', R, 'mm')
# part b
R1 = 1.23*array(( -cos(45*dtr), sin(45*dtr) )) # kip
R2 = array(( 0., -1.55 )) # kip
R = R1+R2
print ('b. vector sum', R, 'kip')

A = array(( 150., -200. )) # lb
B = array(( 200., 480. )) # lb
# part a
R = A+B
R_mag = sqrt( sum(R**2) )
print ('a. R=A+B=',R)
print (' magnitude of R=',R_mag,'lb')
# part b
R = 2*A - (1/2)*B
R_mag = sqrt( sum(R**2) )
print ('b. R=2A-(1/2)B=',R)
print (' magnitude of R=',R_mag,'lb')
To do part (c), solve for $s$ when the $y$ component of $\vec{R}$ is 0.
$R_y = s A_y + B_y = 0$
so
$s = -\frac{B_y}{A_y}$
# part c
s = - B[1]/A[1]
print ('c. s=',s)
For part (d), first compute $\vec{C} = \vec{B}-\vec{A}$, then get its magnitude $\left | \vec{C} \right |$.
Finally, find the unit vector with $\hat{u} = \frac{\vec{C}}{\left | \vec{C} \right |}$.
# part d
C = B-A
C_mag = sqrt(sum(C**2))
u = C / C_mag
print ('d. unit vector=',u)


rAB = 4.*array(( cos(30*dtr), sin(30*dtr) )) # ft
rBA = -rAB
uAB = rAB / sqrt(sum(rAB**2))
uBA = -uAB
FAB = 8.*uAB # lb
FBA = 8.*uBA # lb
print ('a. rAB=',rAB,'ft')
print ('b. rBA=',rBA,'ft')
print ('c. uAB=',uAB)
print ('d. uBA=',uBA)
print ('e. FAB=',FAB,'lb')
print ('f. FBA=',FBA,'lb')


Vector rotations are effected by multiplying the vector by the matrix of trig functions described above. For coordinate rotation through angle $\phi$:
$$ \begin{bmatrix}v_t\\ v_n\end{bmatrix} = \begin{bmatrix} \cos \phi & \sin \phi \\ -\sin \phi & \cos \phi \end{bmatrix} \begin{bmatrix}v_x\\ v_y\end{bmatrix} $$R = 892.0 * array(( -cos(24.78*dtr), sin(24.78*dtr) ))
phi = 40. * dtr # coordinate rotation angle, radians
rot = matrix(((cos(phi),sin(phi)),(-sin(phi),cos(phi))))
print ('original vector R=',R,'lb')
print ('rotation matrix=\n',rot)
Multiplication of a matrix and a vector is done with the dot function. The solution agrees with the result of example 2.7 in the text.
print ('rotated vector=', dot(rot,R), 'lb')


x = 6. # in
y = 12. # in
rOB = array(( x, 0, 4. ))
rOE = array(( 0, y, 0. ))
rBE = rOE - rOB
uBE = rBE / sqrt(sum(rBE**2)) # unit vector pointing from B to E
FBE = 100.*uBE
FEB = -FBE
print ('force the cable exerts on B is',FBE,'lb')
print ('force the cable exerts on E is',FEB,'lb')
See problem 9, above. Use the parameters for 2.88.

A = array(( -1., 8., 4. )) # N
B = array(( 1., 18.,-6. )) # mm
AdotB = dot(A,B)
A_mag = sqrt(sum(A**2))
B_mag = sqrt(sum(B**2))
uA = A / A_mag # unit vector
uB = B / B_mag # unit vector
cos_AB = arccos( dot(uA,uB) ) / dtr # angle in degrees
A_para_mag = dot(A,uB)
A_para = A_para_mag*uB
A_perp = A - A_para
A_perp_mag = sqrt(sum(A_perp**2))
print ('a. angle between vectors=',cos_AB,'degrees')
print ('b. component of A parallel to B=',A_para_mag,'N')
print (' component of A perpendicular to B=',A_perp_mag,'N')
print ('c. vector component of A parallel to B=',A_para,'N')
print (' vector component of A perpendicular to B=',A_perp,'N')
See example 7 above. Use figure P2.104.

A = array(( 6., -2., 3. )) # in
B = array((-14., -2., 5. )) # in
C = cross(A,B)
print ('a. AxB=',C,'in^2')
print ('b. BxA=',cross(B,A),'in^2')
print ('c. the cross product appears to be anti-commutative...!')
print ('d. dot products:',dot(A,C),'and',dot(B,C))