{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 6 Positive Definite Matrices" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:6.1.1 Pg:313" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "f(x,y)=x**2-10*x*y+y**2\n", "f(1,1)= -8\n", "The conditions a>0 and c>0 ensure that f(x,y) is positive on the x and y axes. But this function is negative on the line x=y,because b=-10 overwhelms a and c. \n" ] } ], "source": [ "print 'f(x,y)=x**2-10*x*y+y**2'\n", "a=1\n", "c=1\n", "def f(x,y):\n", " ff=x**2-10*x*y+y**2\n", " return ff\n", "print 'f(1,1)=',f(1,1)\n", "print 'The conditions a>0 and c>0 ensure that f(x,y) is positive on the x and y axes. But this function is negative on the line x=y,because b=-10 overwhelms a and c. '" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ex:6.1.3 Pg:315" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "f(x,y)=2*x**2+4*x*y+y**2\n", "ac= 1\n", "b**2= 4\n", "Saddle point,as ac