Maple code for drawing phase portraits:

restart: with(DEtools): with(linalg):
a:=1: b:=-1: c:=1: d:=1:
A:=array([[a,b],[c,d]]);
charp:= k^2-(a+d)*k+(a*d-b*c);
r_:=solve(charp,k);
if Re(r_[1])<> r_[1]
then
DEplot([diff(x(t),t)=a*x(t)+b*y(t), diff(y(t),t)=c*x(t)+d*y(t)],
[x(t),y(t)],t=-10..10,color=black,linecolor=blue,
[[x(0)=1,y(0)=0],[x(0)=0,y(0)=1],[x(0)=-1,y(0)=0],
[x(0)=0,y(0)=-1]],
x=-5..5,y=-5..5,stepsize=.01)
elif b<>0
then
DEplot([diff(x(t),t)=a*x(t)+b*y(t), diff(y(t),t)=c*x(t)+d*y(t)],
[x(t),y(t)],t=-10..10,color=black,linecolor=blue,
[[x(0)=1,y(0)=(r_[1]-a)/b],[x(0)=1,y(0)=(r_[2]-a)/b],
[x(0)=-1,y(0)=-(r_[1]-a)/b],[x(0)=-1,y(0)=-(r_[2]-a)/b],
[x(0)=1,y(0)=(r_[1]+r_[2]-2*a)/(2*b)],
[x(0)=1,y(0)=(r_[1]-r_[2])/b],
[x(0)=-1,y(0)=-(r_[1]+r_[2]-2*a)/(2*b)],
[x(0)=-1,y(0)=(r_[2]-r_[1])/b]],
x=-5..5,y=-5..5,stepsize=.01)
elif c<>0
then
DEplot([diff(x(t),t)=a*x(t)+b*y(t), diff(y(t),t)=c*x(t)+d*y(t)],
[x(t),y(t)],t=-10..10,color=black,linecolor=blue,
[[x(0)=(a-d)/c,y(0)=1],[x(0)=0,y(0)=1],
[x(0)=-(a-d)/c,y(0)=-1],[x(0)=0,y(0)=-1],
[x(0)=1+(a-d)/c,y(0)=1],[x(0)=-1+(a-d)/(c),y(0)=1],
[x(0)=1-(a-d)/c,y(0)=-1],[x(0)=-1-(a-d)/c,y(0)=-1]],
x=-5..5,y=-5..5,stepsize=.01)
else
DEplot([diff(x(t),t)=a*x(t)+b*y(t), diff(y(t),t)=c*x(t)+d*y(t)],
[x(t),y(t)],t=-10..10,color=black,linecolor=blue,
[[x(0)=1,y(0)=0],[x(0)=0,y(0)=1],[x(0)=-1,y(0)=0],
[x(0)=0,y(0)=-1],[x(0)=1,y(0)=1],[x(0)=-1,y(0)=1],
[x(0)=1,y(0)=-1],[x(0)=-1,y(0)=-1]],
x=-5..5,y=-5..5,stepsize=.01)
fi;